When gonodactylids raise their heads and extend their antennules into a nearly verticle position, they are usually sampling the water for odours. I often see this when I introduce the odour of another stomatopod, food, etc.
You can check this out for yourself. Get an ounze of water that contains the odour of another stomatopod or some of the animals favorite food. Watch the animal for a few minutes to get an idea how it is holding and moving its antennules. Then gently pour the water into another part of the tank. You should see a change within a few seconds. As a control, at a different time you can simply pour in some of the tank water.
Roy