What I found out from breeding Betta's is that atleast they would only jump out of the tanks it I turned off all the light. I never lost one singel Betta with a nightlight on. I also noticed that my fishes became very jumpy and going back and forth shortly after the light came off. So what I did was to install a 9W moonlight bulb that was turned on 24H a day. After this, nobody xept the hatchfish would jump out.