From the National Institutes of Health:
"Magnesium is the fourth most abundant mineral in the body and is essential to good health. Approximately 50% of total body magnesium is found in bone. The other half is found predominantly inside cells of body tissues and organs. Only 1% of magnesium is found in blood, but the body works very hard to keep blood levels of magnesium constant.
"Magnesium is needed for more than 300 biochemical reactions in the body. It helps maintain normal muscle and nerve function, keeps heart rhythm steady, supports a healthy immune system, and keeps bones strong. Magnesium also helps regulate blood sugar levels, promotes normal blood pressure, and is known to be involved in energy metabolism and protein synthesis. There is an increased interest in the role of magnesium in preventing and managing disorders such as hypertension, cardiovascular disease, and diabetes. Dietary magnesium is absorbed in the small intestines. Magnesium is excreted through the kidneys."
Cramps can be a symptom of magnesium deficiency.
"What is the health risk of too much magnesium?
"Dietary magnesium does not pose a health risk, however pharmacologic doses of magnesium in supplements can promote adverse effects such as diarrhea and abdominal cramping. Risk of magnesium toxicity increases with kidney failure, when the kidney loses the ability to remove excess magnesium. Very large doses of magnesium-containing laxatives and antacids also have been associated with magnesium toxicity. For example, a case of hypermagnesemia after unsupervised intake of aluminum magnesia oral suspension occurred after a 16 year old girl decided to take the antacid every two hours rather than four times per day, as prescribed. Three days later, she became unresponsive and demonstrated loss of deep tendon reflex. Doctors were unable to determine her exact magnesium intake, but the young lady presented with blood levels of magnesium five times higher than normal. Therefore, it is important for medical professionals to be aware of the use of any magnesium-containing laxatives or antacids. Signs of excess magnesium can be similar to magnesium deficiency and include changes in mental status, nausea, diarrhea, appetite loss, muscle weakness, difficulty breathing, extremely low blood pressure, and irregular heartbeat."