Magnesium does not get as much attention as calcium or vitamin D, but your body depends on it for hundreds of processes every day. It helps your muscles and nerves work, keeps your heartbeat steady, supports strong bones and plays a part in turning food into energy. Many adults do not get as much magnesium as recommended from their diet, so it is worth understanding where it comes from and how much you need.
What does magnesium do in the body?
According to the NIH Office of Dietary Supplements, magnesium is involved in more than 300 enzyme reactions. Its main roles include:
- Muscle and nerve function: it helps muscles relax after they contract and supports normal nerve signalling.
- Heart rhythm: it helps maintain a steady heartbeat.
- Bone health: about 60% of the magnesium in your body is stored in your bones.
- Energy and blood sugar: it is needed to convert food into energy and to help insulin work properly.
- Making protein and DNA: it is part of the process of building and repairing cells.
How much magnesium do you need?
The recommended daily amounts for adults are:
- Men aged 19 to 30: 400 mg
- Men aged 31 and over: 420 mg
- Women aged 19 to 30: 310 mg
- Women aged 31 and over: 320 mg
- During pregnancy: 350 to 360 mg
Most people can reach these amounts through food. Magnesium from food is not considered harmful, because healthy kidneys remove any extra.
The best food sources of magnesium
Magnesium is found mainly in plant foods, especially those that are high in fibre. Good sources include:
- Pumpkin seeds: one of the richest sources, with around 150 mg in a 30 g (1 oz) serving.
- Almonds and cashews: roughly 75 to 80 mg per 30 g handful.
- Spinach: about 75 mg in half a cup of cooked spinach.
- Black beans and other legumes: around 60 mg in half a cup.
- Whole grains: oats, brown rice, quinoa and wholewheat bread.
- Dark chocolate: a small square of 70% or higher dark chocolate adds a useful amount.
- Avocado, bananas and yogurt: smaller amounts that add up over the day.
A simple pattern, such as oats with nuts for breakfast, a bean salad at lunch and leafy greens with dinner, can cover most of your daily needs.
Signs you might not be getting enough
Serious magnesium deficiency is uncommon in healthy people, but low intake over a long time may contribute to health problems. Early signs of low magnesium can include tiredness, weakness, loss of appetite and nausea. More severe deficiency can cause muscle cramps, numbness, tingling and abnormal heart rhythms.
These symptoms have many possible causes, so do not assume they are due to magnesium. A doctor can check your levels if needed.
Who is more likely to be low in magnesium?
- Older adults, who tend to absorb less magnesium and lose more through the kidneys.
- People with type 2 diabetes, because high blood sugar increases magnesium loss in urine.
- People with digestive conditions such as Crohn’s disease or coeliac disease.
- People who drink a lot of alcohol over a long period.
- People taking certain medicines, such as some diuretics or long-term proton pump inhibitors for acid reflux.
Do you need a magnesium supplement?
Most healthy people do not need one if they eat a varied diet with whole grains, nuts, seeds, legumes and vegetables. Supplements can be helpful for some people, but there are a few things to know:
- The upper limit for magnesium from supplements is 350 mg a day for adults. Taking more can cause diarrhoea, nausea and stomach cramps.
- Very high doses can be dangerous for people with kidney problems.
- Magnesium can interact with some medicines, including certain antibiotics and osteoporosis drugs.
If you are thinking about taking a supplement, check with your doctor or pharmacist first, especially if you take regular medication.
Magnesium and sleep or muscle cramps
Magnesium is often promoted for better sleep and fewer night-time leg cramps. The research on both is limited and mixed. For most people, regular sleep habits, staying active and stretching are better supported starting points. If cramps are frequent or severe, see a doctor to rule out other causes.
The bottom line
Magnesium is essential for your muscles, nerves, heart and bones. Adults need roughly 310 to 420 mg a day, and the easiest way to get it is from nuts, seeds, beans, leafy greens and whole grains. Supplements can help some people, but they are not necessary for everyone and should be used with medical advice.
This article is for general information only and is not a substitute for medical advice. Talk to your doctor before starting any supplement.



