I have long suffered leg cramps, and the only preventive measure that seems to work for me is physical conditioning. I tried potassium, sodium, magnesium, etc., supplements--no improvement. Diving frequently is probably the best conditioning. I don't dive often enough to condition my legs through diving alone, so I hit the gym. What seems to be effective for me is cycling, particularly with the toes pointed slightly downward at the bottom of the stroke--exactly the position real cyclists avoid.
Edit: Pebbles posted a more thorough explanation while I was typing. And to give credit where credit is due, I got this tip from a Dan Volker post.
Edit: Pebbles posted a more thorough explanation while I was typing. And to give credit where credit is due, I got this tip from a Dan Volker post.