The issue is water quality. Most stomatopods under about 4 inches can life happily in a 5 gal tank, but it depends on how you maintain good water conditions. Stomatopods do not need strong lighting. In fact, if they can't stay in a dark burrow or cavity, they often develop algal growths that can be fatal. You will only require strong broad spectrum lighting if you decide to use live rock. I keep many of my animals in 2 gal. glass tanks with a thin sand/gravel bed, a couple of pieces of coralline algae (species that do well in low light) and run a Fluval filled with crushed coral. I make frequent water changes and keep the animals away from direct sunlight. They do very well under such conditions.
Roy