I will mention a few of which magnesium have been of help for me. Cramps is common with hypoparathyroidism. Magnesium inhibit calcium entry into nerve terminal. Severe magnesium depletion leads to tonic-clonic convulsions. In obstetrics magnesium sulfate has an anticonvulsive, sedative and blood pressure lowering effect due to its blockade of the neuromuscular transmission.
Magnesium sulfate has no place in the therapy of leg cramps.
I only mention this practice in obstetrics to illustrate the cramp lessening effect of magnesium. Hard training seems to deplete the body of this mineral as well as other minerals. Start with 500 mg 3 times a day and work up to 1 g 3 times a day after 2 weeks. Pyridoxine, vitamin B6, is also supposed to reduce leg cramps. Taurine, an amino acid in meat, can have an effect in the treatment of leg cramps.