From winterkill in ponds to pet goldfish in bowls, fish tend to float at the surface after they have died. Why?
Most fish species have a swim bladder that holds oxygen. When the fish wants to swim upwards, it adds oxygen to the swim bladder to make it lighter. When the fish wants to go downwards, it lets oxygen out of the swim bladder. This is a chemical response to water pressure so the fish doesn’t actually think about the process.
Fish are denser than water, so they have a natural tendency to sink but the swim bladder can counteract the sinking. The swim bladder is located near the stomach below most of the fish’s mass of bone and muscle.
If minimal oxygen is in the swim bladder upon death, a fish may sink to the bottom. Once bacterial decomposition begins, gases are produced and fill the belly of the fish like a balloon. This causes the fish to float to the surface.
Since the swim bladder and the gases are in the belly, the fish will naturally float belly-up.