Generally stomatopods on the way out leave their burrows or cavities. They almost always lie on their side or back (depending on the species, and often the raptorial appendages are extended. If an animal stays like this for more than a few minutes or is unable to right itself when disturbed, the game is probably over.
Also, if the animals is acting stressed, do not try to feed it. Mantis shrimp can go for weeks without food and unless they vigorously take food, don't stress them further by offering food. Occasionally, an animal approaching a molt will attack live food or take and then reject an item. If they do this, remove the item. Just like we say "no thank you" or push back from the table, a stomatopd rejects food my pushing it away using its 3-5 maxillipeds (mouth parts). Honor the request to "get that food out of my face".
Roy