What does magnesium do for the body?

Magnesium: what does magnesium do for the body and what do we need to be eating to get enough magnesium?

Woman holds magnesium tablets in one hand and a glass of water in the other
(Image credit: Getty)

What does magnesium do for the body? Magnesium is a mineral that our bodies store in our skeletons, where we access it through a cycle of bone mineralisation and demineralisation. We have to replenish our body’s magnesium supply as it is used in order to keep ourselves healthy and support the proper function of our biochemical processes. 

Here we’ll look at the best dietary sources of magnesium and when it might be worth considering supplementation to support yourself. We’ve also spoken to some experts to get their input on how our bodies use magnesium and where to get it. 

As well as magnesium, some of the best vitamin D supplements can help support your body, as vitamin D helps us to extract the minerals calcium and phosphorus from our food and put them to work in the body.

What role does magnesium play in the body?

We spoke to Keeley Holland, a molecular biologist and product development manager at BetterYou (opens in new tab), who explains that magnesium is used throughout the body for chemical reactions. “Magnesium plays a role in over 300 reactions in the body, from making proteins to aiding our sleep,” she says. “Magnesium also works in tandem with calcium to aid muscle function, including supporting one of the most important muscles in the body – the heart. When it comes to energy and sleep, magnesium can assist with both. Magnesium alerts receptors in the brain when it’s time to wind down and go to sleep. This mineral also supports keeping fatigue at bay by turning the food we eat into energy. 

“Magnesium also has mood-boosting properties by helping to regulate hormones such as serotonin and melatonin, the ‘feel good hormone’ and ‘sleepy hormone’. With magnesium also being a natural muscle relaxant, it can help promote exercise recovery by removing the build-up of lactic acid. By having a more restful night’s sleep, muscle recovery after exercise is supported too.”

Dr Sarah Brewer, a GP and Medical Director of Healthspan (opens in new tab) tells us more about why magnesium is so important for proper bodily function. “It’s now estimated that magnesium is needed for over 700 enzymes to work properly,” she says. “It is involved in just about every metabolic reaction from the production of energy to the synthesis of hormones, proteins and genetic material.”

What are signs of low magnesium in the body?

The US Department of Agriculture (opens in new tab) estimates that 48% of Americans are not consuming enough magnesium and may need to supplement their diet. While it is important to try and meet all your vitamin and mineral needs through your diet, this is sometimes not possible and supplementation is needed for good health. 

Holland explains the main symptoms of magnesium deficiency. “When we don’t get enough magnesium, we may first see signs of fatigue and tiredness particularly within our muscles feeling sluggish. This can then go hand in hand with disruptions to sleep, causing restless legs during the night or feeling like you can’t switch off before you go to sleep. With magnesium affecting the muscles, in some cases of deficiency you may notice mild heart palpitations or the feeling of an irregular heartbeat, or tingling in the hands, feet and face. It’s important to check with a GP in any instance that these symptoms occur as they could also be signs of other conditions.”

A review about magnesium status and how it relates to stress in Nutrients (opens in new tab) journal found that chronic stress and anxiety depletes the body’s stores of magnesium. Without these stores to rely on, the body is less equipped to deal with stress. We then end up in a cycle of magnesium depletion due to stress, then cannot handle the stress due to the reduced magnesium levels. For those with chronic stress and anxiety, low magnesium levels may be of particular concern.

Dr Brewer lists her top red flags for magnesium deficiency that she looks out for as a doctor: 

  • Loss of appetite
  • Nausea
  • Fatigue
  • Muscle weakness, trembling or cramps
  • Numbness and tingling
  • Poor coordination
  • Heart palpitations
  • Constipation

Should you take magnesium every day?

Magnesium supplementation can be helpful in the treatment of mild anxiety and anxiety related to premenstrual syndrome in women, as indicated in a review in the journal of Magnesium Research (opens in new tab).

Holland is also a great advocate for magnesium supplementation to support your health. “It’s important to replenish our vitamin and mineral requirements frequently, particularly in the cases of deficiency or if you are prone to deficiency due to an underlying health condition or ‘at-risk’ group,” she explains. “I would always recommend food first, but if you struggle to get enough magnesium in your diet, transdermal magnesium is a great place to get extra support through supplementation.” ‘Transdermal’ means that the magnesium is delivered through the skin, usually in the form of an ointment or patch, which effectively allows full systemic circulation   

A Cochrane (opens in new tab) review found that magnesium supplementation may reduce the risk of hospitalization in pregnant women. While you should never take a supplement without the guidance of a doctor, particularly when pregnant, magnesium is present in a lot of prenatal supplements, alongside iron and calcium to support proper fetal development.

Woman taking a rest during exercise

(Image credit: Getty)

What foods are high in magnesium?

Holland gave her list of top magnesium-rich foods:

  • Spinach
  • Nuts (e.g. peanuts, almonds and cashews)
  • Beans (e.g. black, kidney and edamame beans)
  • Avocados
  • Whole grain bread
  • Brown rice
  • Potatoes
  • Soy milk

Whether you eat everything, or are plant-based, there are plenty of ways to get magnesium through your diet, and this should always be your first port of call before trying supplementation. If you think you may be magnesium deficient, go to your doctor for blood work for confirmation; symptoms of magnesium deficiency might also indicate other underlying conditions and your doctor will want to check you out. 

Lou Mudge
Lou Mudge

Lou Mudge is a Health Writer at Future Plc, working across Fit&Well, Coach, LiveScience, T3, TechRadar and Tom's Guide. Based in Bath, UK, she has a passion for food, nutrition and health and is eager to demystify diet culture in order to make health and fitness accessible to everybody.


Multiple diagnoses in her early twenties sparked an interest in the gut-brain axis and the impact that diet and exercise can have on both physical and mental health. She was put on the FODMAP elimination diet during this time and learned to adapt recipes to fit these parameters, while retaining core flavors and textures, and now enjoys cooking for gut health. You can find her on Instagram at @loulouapril