If it's moving it's both happy with something and is looking for a proper spot where it can do the best. Even if you try to put it somewhere it will still likely move
20 Gallon SPS reef
29 Gallon FW "fat catfish" tank
20 Gallon Long Dart Frogs "Zig" and "Zag"