Sometimes they detach to move to a more favorable place. If some detach but their neighbors stay, it may be more of a reproductive action. In either case, it sometimes works to place some crushed coral or small rubble in a bowl or cup in a corner of the tank where you can put the loose Mushrooms so they won't blow away. Sometimes I place some netting over the top. If after a week or so they haven't attached to the rock, they will probably do better in a different tank.
Aloha,
Mark