Why does my fish keep keep glass surfing?
“Glass surfing” is when a fish – such as betta fish, gouramis, and cichlids – repeatedly swims up and down along the tank walls. It could be caused by stress, boredom, defense of territory, and other reasons. While there is no guaranteed cure for this behavior, many hobbyists have tried covering or painting the tank walls in black to reduce reflection, increasing flow with a powerhead, decreasing flow with a sponge filter, blocking their favorite corner with tall decorations or plants, adding tannins to the water with catappa leaves to decrease visibility, feeding different kinds of live foods for them to hunt, and adding other forms of enrichment.
Note: In some cases, the glass surfing is not always a negative sign of stress. Pygmy corydoras have been known to hang out next to their reflections because they are a schooling fish and they are comforted by being near their "new friends."