According to PetPlace.com, fish that are swimming at the top of an aquarium likely do not have enough dissolved oxygen in their water. This problem is also known as hypoxia.
The chances of hypoxia occurring in an aquarium increase when fish are overcrowded or do not have an adequate filtration system. If fish are swimming at the top of the aquarium, which is one of the hallmark symptoms of hypoxia, the owner should perform a water test to check the water's oxygen levels. These water test kits are inexpensive and invaluable for fish keepers. PetPlace.com also explains that some veterinarians perform specialized water tests to rule out other problems that are sometimes similar to hypoxia, including gill disease, hypothermia and chlorine toxicity.
If the water test kit shows the oxygen levels are indeed low or if a kit cannot be purchased, About.com states that performing a 50 percent water change is necessary. About.com and PetPlace.com both warn that water should be treated with a specialized aquarium formula prior to being added to a tank. The new water adds oxygen to the tank and temporarily saves any inhabitants that are not too far gone, but About.com states that hypoxia is likely to occur again unless the root problem is addressed.