Magnesium is quite in vogue, arguably surpassing calcium as the go-to drugstore aisle mineral supplement -- and for good reason.
Magnesium is responsible for over 300 enzymatic reactions in the body, including energy production, nutrient transport and muscle relaxation.
The Dietary Reference Intake set by the USDA for most adults is 400 milligrams, yet over half the population falls below this amount and is thereby considered to be deficient in magnesium.
Functions of magnesium
Nearly every mineral works in concert with another mineral to maintain balance in biological process; in this case, it's calcium. Magnesium transports calcium across the cell membrane and into the cell, then shuttles calcium out of the cell. According to the The Weston A. Price Foundation article Magnificent Magnesium, "When excess calcium enters the cells because of insufficient magnesium, muscle contraction is sustained for too long, and we suffer, for example, twitches and tics in mild cases."
With an adequate supply of magnesium, calcium can be properly transported out of the cell by magnesium to avoid hyperactive muscle contractions and cramps. Calcium and magnesium work hand-in-hand; an excess or deficiency of either can inhibit biological functions of both. Research shows ancestral-based diets had a calcium to magnesium ratio of 1:1. 
ATP (adenosine triphosphate, AKA the main source of energy in cells) must be bound to a magnesium ion to metabolize carbohydrates and fats for energy. Fatigue and muscle cramping can be a sign of magnesium insufficiency.
Recent studies, including this one, this one and this one have associated higher blood plasma levels or supplementation of magnesium with a decrease in blood pressure, sudden cardiac event and stroke, respectively.
It should be noted that 60-65% of magnesium is stored in skeleton and teeth, 35-40% in muscle tissues and cells, and only 1% resides in the blood. Thus, testing for levels in the blood may not provide an accurate picture of the body's total magnesium status.
OK -- you've convinced me. Just tell me what to eat.
Magnesium-rich foods include nuts and green leafy vegetables. The mineral content in plant-based foods can be influenced by the quality of the soil in which the food was grown. Sourcing food grown in mineral-rich soil can enhance both mineral and nutrient content.
Most people can benefit from 400-1,000 mg. of magnesium per day.
It should also be noted that nuts contain an antinutrient called phytic acid. Phytic acid can bind to minerals like magnesium and inhibit mineral absorption. Soak and dehydrate these nuts for optimal mineral absorption.
What about supplements?
While eating whole foods is the most ideal form, supplementation can be a beneficial backup, and it can also help with sleep.
Supplementing with a chelated form allows for the greatest absorption and availability of magnesium. A chelated mineral is a mineral molecule bound to an amino acid. The body recognizes the amino acid as a protein and absorbs both the mineral and amino acid. Non-chelated forms have lower rates of absorbability, and are often excreted.
Chelated forms, more expensive:
- Magnesium glycinate (chelated with amino acid, glycine)
- Magnesium taurate (chelated with amino acid, taurine)
Non-chelated forms, less expensive:
- Magnesium citrate
- Magnesium oxide
Other cofactors for proper assimilation include Vitamin B6, C, D and E along with minerals sodium, potassium, phosphorus and selenium.
Magnesium is involved in too many metabolic and energy processes to risk deficiency. Eat plenty of green leafy vegetables, consume nuts in moderation and supplement wisely.
1. Eades M, Eades A, The Protein Power Lifeplan, Warner Books, New York, 1999