According to Practical Fishkeeping, a goldfish swimming on its side indicates swim bladder disorder. The affected fish looks healthy except that it cannot swim upright. The affected fish may swim upside down or float helplessly, depending on the severity of the disorder.
Swim bladder disorder is commonly caused by overfeeding and accidental air consumption, especially in fancy goldfish with compacted digestive systems. Feeding should be avoided for one to three days to aid in reversing the symptoms. After resolving the disorder, sinking foods help minimize air consumption. The disorder is found almost exclusively in short, round-bodied fish, such as pearl scale goldfish and balloon mollies.