Fish swimming up and down the glass in an aquarium is a common behavior and can be caused by various reasons. Here are some possible explanations: Stress: Fish may swim up and down the glass if they are stressed or uncomfortable in their environment. Causes of stress can include poor water quality, inadequate hiding places, external stimuli, and aggressive tank mates. Boredom: Fish may swim up and down the glass if they lack stimulation or enrichment in the aquarium. In this case, providing more plants, decorations, or toys in the aquarium can help to reduce boredom and increase mental stimulation for the fish. Territorial behavior: Some fish, such as cichlids, may swim up and down the glass to defend their territory from perceived intruders, including other fish or their own reflection in the glass. Hunger: Fish may swim up and down the glass if they are hungry or looking for food. This behavior is more common during feeding times.