Yes potassium potassium for leg cramps.
http://www.healthaliciousness.com/articles/food-sources-of-potassium.php
To answer your initial question I was way smarter in the 6th grade but less wiser.
Maybe it's because it has potassium Sulfate or that carbon dioxide is release through the muscles.
Actually I drink tonic water occasionally for the leg cramps as it containes quinine. Quinine has had some medicinal use in reducing leg cramps. However quinine has it's own problems so I do not drink it very often.
Doing the night time leg cramp hop hop hop
Lynn