To clarify and help, there are 3 reasons an anemone deflates.
#1, the anemone is moved from low light to high light conditions. In the new high-light environment, the anemone deflates, opens its mouth, and expels zooxanthellae algae that it no longer needs. It then re-inflates like Lynden says and it's fine.
#2, the anemone is moved from good water conditions to poor water conditions. The anemone responds by deflating and expelling zooxanthellae repeatedly as a stress response. The anemone will expel zooxanthellae until it bleaches. This is very bad and unless conditions are improved, the anemone is fed, and a little luck is on the aquarist's side, it may well die.
#3, the anemone is placed in exceptionally poor conditions and/or is poisoned. The anemone will deflate and open its mouth WIDE, almost as wide as the foot itself. the nem will then turn itself inside out, exposing its innards on the outside. This is a sign of an anemone that might as well already be dead.
There are a few other reasons, but these are the most often reported by aquarists. Option #1 is quite common, and just fine, hence the possibility for confusion.