A dirty aquarium, parasites, swim bladder and aggressive fish can all lead to a goldfish staying on the bottom of the tank. Most of these causes have easy fixes.
Goldfish tanks should be changed regularly. They are very messy fish that create high levels of ammonia. The ammonia can cause them to become sick and stay on the bottom. Goldfish can get fish lice and other bugs if they are not properly cared for. There are medications used to prevent or stop infestations. Swim bladder is another cause for bottom swimming or laying. If the fish does not have the proper diet, they become constipated which pushes on the swim bladder and messes with their buoyancy. Aggressive fish also cause goldfish to stay on the bottom and attempt to hide.