Besides the doubtful effectivity, the intake of therapeutic dosis of magnesium is associated with some side effects, mainly gastrointestinal such as diarrhoea and a mineral unbalance.
So instead of searching a remedy of cramps, it is better to research the reason why it is appearing in the first place.
It is admitted that sugar leads to a lack of magnesium. Specifically, in order to metabolise every molecule of sacarose of sugar, the body needs to spend 54 molecules of magnesium. ( “L’équilibre glycémique”, Jacques Fontaine).
This problem coming from sugars doesn’t happen with fresh fruit, because fruit contains all the needed minerals in order to metabolise sugar. But it is also appearing with the intake of dried fruit (dates, raisin, dried figs, etc.), because the concentration of sugar is much higher. Sometimes some highly sweet grape varieties are also problematic, as well as any kind of sugars, syrups and honey.
I encourage you to verify it yourself. Next time you have a cramp think if you had eaten any of this kind of products.
Sugars, in addition to cramps, are also associated with a long list of health issues: it feeds undesirable bacteria in the intestine, provoking cavities, intestinal worms, candidas, etc.; it weakens the immune system; it can induce diabetes; it is related to cardiovascular diseases; it is inflammatory, so it is involved in different aches, etc. In this article you will find more information about the ravages of sugars.