There is limited evidence for supplementation for the treatment of muscle cramps.
Magnesium has been found to be ineffective for preventative use of muscle cramps in the elderly, and has mixed results in pregnancy.[1][2][3][4]
One small trial of a B complex supplement containing 50 mg of fursultiamine (a derivative of Thiamine), 250 µg hydroxocobalamin (vitamin B12a), 30 mg of pyridoxal phosphate (the active form of vitamin B6), and 5 mg of riboflavin showed 86% remission rate of muscle cramps in nocturnal leg cramps in elderly patients with hypertension. However, completion rate and compliance were not discussed in the study.[5] Another small study found a B complex (100 mg thiamine, 40 mg pyridoxine) effective in reducing muscle cramp frequency and intensity in pregnant study participants.[6]
Calcium and vitamin D supplementation (both together and alone) have been studied for leg cramps in pregnancy, but they were not found to be consistently effective at reducing cramping.[7]