Swimming bladder.
When the fish die, the oxygen in the bubble remains, along with the breakdown of the tissues that will produce more gas but they have no way to escape causing the fish's abdomen to expand. At that time, the fish died as a bubble, floating on the surface of the water. Because the backbone and muscles on the back are heavier, this part will sink to the bottom and the abdomen will turn up.
But not every dead fish is floating. In some cases, the fish dies when there is no air in its bubble, the fish will sink and decompose as usual in the water. In the process of decomposing an amount of gas is created inside the fish, and when there is enough gas, the body of the fish will float to the surface of the water again.