Magnesium is known as an ultimate relaxation mineral. Healthy levels of magnesium calm the nerves, promote good sleep and good mood, and bring anxiety and depression levels several notches down. In simple words, magnesium equips our nervous system to respond to stress better. Magnesium deficiency has been associated with a wide range of stressful conditions – jingled nerves, migraine, chronic fatigue syndrome, fibromyalgia, audio-genic stress, depression, anxiety and poor sleep.
Why magnesium plays a critical role in stress management is hardly surprising considering that it is the fourth most abundant mineral in the body and the second most abundant mineral present in the intracellular matrix, after potassium. Indeed, magnesium is involved in a variety of cellular processes that includes a long list of biochemical reactions, ion channels activity, regulation of metabolic pathways, mediating neural transmission in the Central Nervous System (CNS), bone and muscle health, energy production, synthesis of proteins, DNA, RNA and glutathione, the master anti-oxidant and so much more. It is believed that more than 325 enzymes are dependent on magnesium and many of these are, in fact, nervous system enzymes  – clearly underscoring the role of magnesium in keeping the central nervous system healthy and nourished.
Magnesium as a counter ion to Calcium
First, here is a primer on the relationship between calcium and magnesium.
We know calcium as an important mineral in maintaining a healthy skeletal system. And of course there is more to it. Calcium is required by a cell to perform many other critical functions such nerve impulse conduction, brain neuron firing and hormone secretion. Once it has accomplished its tasks, it is important that it is ushered out of the cells, a task executed by magnesium. Magnesium works like a key that controls calcium channels – allowing potassium and calcium to enter and exit the cells as and when they are needed. It also helps the cell to produce energy needed to pump the calcium back to the extracellular matrix.
In addition, during a stressful situation, calcium enters into cells and facilitates the “fight or flight” response  – a sequence of hormonal changes that makes the body more responsive to deal with the stress, be it physical or psychological. As we are going to find out, all this chemical mayhem makes the nerve cells tense up, the heart beat faster and blood pressure to go up. Fortunately, as soon as the stressor is dealt with, our body resumes it calm, balanced state and as a counter ion to calcium, magnesium plays an important role here in keeping the calcium out.
What if your body is deficient in magnesium? With nothing to stop it, calcium can easily sneak up into the cells and create havoc in the form of painful, sustained muscle contractions, constant nerve cells firing and hyper-excitability. Your nerve cells don’t find a moment to relax – making you highly strung, anxious and always in an alert mode.
Magnesium as a counter to stress hormones
While preventing cells from calcium overload is one mechanism where magnesium helps, it also maintains the homeostasis of the hypothalamic-pituitary-adrenal (HPA) axis, a complex set of hormonal interactions, chemical signals and feedback loop – playing an extremely important role in stress response besides other functions such as regulating mood, digestion, immunity, libido, metabolism and maintaining right levels of energy.
When in stress, our body produces stress hormones such as cortisol, norepinephrine and adrenaline to deal with an imminent threat and make quick, life-saving decisions. In the face of a stressor, hypothalamus signals to the pituitary gland to secrete adrenocorticotropic hormone (ACTH) that, in turn, stimulates the adrenal glands to release a surge of cortisol and other hormones like adrenaline, preparing the body for the classic “flight or fight” mode – our body’s primitive, inbuilt response that prepares the body to either fight back or flee from any perceived threat.
Along with others stress hormones, cortisol taps into your energy reserves so that you are able to deal with a stressor at hand with utmost efficiency. All this chemical frenzy manifests in the form of an increased flow of glucose to the muscles for a much needed burst of energy, increased blood circulation and respiratory rate to make more oxygen available to brain cells, and diverting the flow of blood to critical organs such as the heart, brain and skeletal muscles.
So far so good. However, long-term stress and continuous release of stress hormones can disrupt the HPA axis and thereby subverting cortisol’s well-meaning intentions. In the modern world where we have stressors almost in every walk of life, our HPA axis is clearly confused and stuck in ‘ON’ mode – being constantly directed to release cortisol. The result is cortisol doesn’t know when to quit exactly. Too much pressure on adrenals leads to adrenal fatigue and accompanying symptoms such as blood pressure, headaches, palpitations, anxiety attacks, depression, poor sleep, digestive disorders, impaired immunity, excessive weight gain, diabetes and heart disease.
How does magnesium help in maintaining a healthy HPA axis? Magnesium acts in the adrenal gland to trigger a healthy, balanced response to ACTH, thus keeping the release of cortisol as well as other stress hormones within a harmless, well-meaning range.  
Magnesium and NMDA receptor
Much of the neurological benefits of magnesium can be attributed to its binding ability to N-methyl-D-aspartate receptor or NMDA receptor – a fascinating mechanism involved in our ability to deal with stress. NMDA is basically a glutamate receptor and gets activated when glutamate, an excitatory neurotransmitter, binds to it. Though NMDA activation is critical for the development of our Central Nervous System and in learning and memory, abnormal activation can cause neurotoxicity and damage nerves – resulting in neurological ailments, for example mood disorders, anxiety and panic attacks and neuropathic pain commonly associated with fibromyalgia.
However, magnesium can also bind with NMDA receptor but instead of activating it, it only acts as a placeholder or a gate keeper thus keeping glutamate-mediated excitability within a healthy range.  
Magnesium and neurotransmitters
Magnesium helps in the production of many important neurotransmitters that help in eliminating symptoms associated with mood disorders, anxiety and depression.
- Cofactor of tryptophan hydroxylase, an enzyme that helps in biosynthesis of serotonin, brain chemical that regulates mood, social behavior, appetite, cognitive functions, sleep and of course stress responses.
- Increases brain-derived neurotrophic factors or BDNF, which together with magnesium inhibits the activity of GSK-3, an enzyme which is also targeted by antidepressant drugs.
- Robert Vink. Magnesium and stress. ResearchGate. 2015
- Timothy S. Luongo et al. The Mitochondrial Calcium Uniporter Matches Energetic Supply with Cardiac Workload during Stress and Modulates Permeability Transition. Cell Reports, June 2015
- Sartori SB, Whittle N, Hetzenauer A, Singewald N. Magnesium deficiency induces anxiety and HPA axis dysregulation: modulation by therapeutic drug treatment. Neuropharmacology (2012) 62(1):304-12.
- Held K, Antonijevic IA, Künzel H, et al. Oral Mg(2+) supplementation reverses age-related neuroendocrine and sleep EEG changes in humans. Pharmacopsychiatry (2002) 35(4):135-43.
- Szewczyk B et al. Antidepressant activity of zinc and magnesium in view of the current hypotheses of antidepressant action. Pharmacol Rep. 2008 Sep-Oct;60(5):588-9.
- Poleszak E, Wlaź P, Wróbel A, et al. NMDA/glutamate mechanism of magnesium-induced anxiolytic-like behavior in mice. Pharmacol Rep (2008) 60(5):655-63.