Magnesium for skeletal muscle cramps, an update to the Cochrane Review study (first published in 2012), published on 21 September 2020 by Cochrane Neuromuscular Group, is likely the most thorough literature review performed to evaluate the effect of magnesium in preventing muscle cramps.
The researchers compared the use of magnesium with the use of placebo or other cramp therapies.
The results of this systematic literature review all but debunked the popular belief that magnesium is efficient at preventing muscle cramps. Not only did people who were given a placebo experience little to no difference as far as cramps go, people who took magnesium supplements were much more likely to experience adverse events, such as diarrhoea.
And before you consider upping up that magnesium intake during exercise, consider the observation that magnesium accumulates in fatigued muscles and coincides with fatigue.