Foods rich in magnesium - 11 to add to your diet for better sleep

Incorporating foods rich in magnesium into your diet can offer a whole range of health benefits - here, nutritionists reveal the best ones to try

Bananas and blueberries sitting in a bowl of wholegrain porridge, which sit among the foods rich in magnesium
(Image credit: Getty Images)

Adding foods rich in magnesium to your daily diet can offer plenty of health benefits, with better sleep, stronger bones, and support for a healthy heart sitting among them. 

Many people, especially recently, are extolling the virtues of this mineral for sleep but there are plenty of other benefits of magnesium to take advantage of. "Magnesium is needed for every cell in your body to function at its best and is a must for women throughout their lives, especially from the age of 35 onwards when they may start to go through perimenopause and menopause," says nutritionist Dr Naomi Newman-Beinart. "This is a time when symptoms such as stress, poor sleep, and low mood play a huge role in quality of life, and this is where magnesium can come into play."

Supplementing with magnesium can be a quick and easy way to get more of this vital mineral - but it's not always necessary. You can also add a few foods rich in magnesium to your diet to meet the optimum daily 270mg and leave the supplements on the shelf. 

Foods rich in magnesium 

1. Nuts

"A small handful of cashews, almonds and Brazil nuts are a great option if you are hoping to improve your magnesium intake, as around 28g cashews contain approximately 80g magnesium," says Dr Newman-Beinart. 

Adding just a handful of nuts to your porridge or salad during the day could contribute to an impressive 30% of your total magnesium intake for the day. Otherwise, a handful of nuts as a snack before you go to sleep could help you sleep better, given the sleep-inducing benefits of magnesium. 

Dr Naomi Newman-Beinart
Dr Naomi Newman-Beinart

Dr Naomi Newman-Beinart is a London based, leading health expert, passionate about natural solutions to help people living with pain and chronic conditions. She is a Chartered Psychologist (The British Psychological Society) with a PhD in Health and Medical Psychology from King's College London, MSc in Health Psychology from UCL and certified Nutritionist (BSc, Nutritional Medicine).

2. Bananas

Bananas aren't only a potassium and carbohydrate-rich fruit that can help keep you full from breakfast through to lunch, they also sit among the foods rich in magnesium with 37mg of the mineral available in just one banana. 

They are also high in vitamin C, vitamin B6 (which can help with magnesium absorption, manganese, and fibre. 

Bowl of berries, including blackberries and cherries

(Image credit: Getty Images)

3. Berries

While blackberries aren't the fruit highest in magnesium (bananas take that title, of course), they do offer 20mg of magnesium per 100g, so they are a worthwhile one. 

Equally, you may have heard about TikTok's 'Sleepy Girl Mocktail'. This contains tart cherry juice, another berry worth adding to your basket thanks to its 22mg magnesium offering per 100g of cherries. 

As well as being high in magnesium though, berries are also one of the foods high in vitamin C, making them a winner for anyone looking to keep seasonal colds at bay. "Magnesium is vital for immune function as it plays a crucial role in various immune system processes. It supports the activation and function of immune cells, including T lymphocytes and natural killer cells, which are essential for recognising and combating infections," says VJ Hamilton, a BANT registered nutritionist and the founder of The Autoimmunity Nutritionist platform. 

VJ Hamilton

VJ Hamilton is a nutritionist, functional medicine practitioner, and an expert in gut, skin, and immune health. 

4. Leafy green vegetables

Leafy green vegetables such as spinach and kale are also great options, says Hamilton. 

As well as being high in vitamin C, K, A, folate, and potassium, spinach offers an impressive 79mg per 100g, making it the most magnesium-rich of all the green veggies. Kale, which offers approximately 44g per 100g serving, comes in second-best. 

5. Legumes

Sitting among the highest-protein foods and the top gut-healthy foods, legumes like beans, lentils (35mg per 100g), and chickpeas (115mg per 100g) are excellent all-rounders in any type of diet. 

Some are better than others though, says Dr Newman-Beinart. "When adding legumes to your diet, it’s useful to know that black beans contain a whopping 120g of magnesium per 170g serving." 

Bowl of legumes as one of the foods rich in magnesium

(Image credit: Getty Images)

6. Fatty fish

Hamilton recommends adding some fish - namely mackerel and salmon - to your diet as they sit among the foods rich in magnesium. 

Salmon may be the more popular of the two taste-wise but if you're looking to top up your magnesium levels then the mild-tasting mackerel is a better option with 60mg of magnesium per 100g, compared to just 27mg of magnesium per 100g of salmon. 

Either way though, they both make excellent additions to a nutrient-rich diet as fatty fish is also rich in Omega-3 fatty acids, which have been proven (by the likes of Harvard School of Public Health) to reduce the risk of adverse heart conditions. 

7. Avocados

This brunch staple is a must-have if you're looking to boost your magnesium levels throughout the day as a standard 170g avocado will offer up 58mg of magnesium,, almost 20% of the daily recommended amount.

Avocados are also rich in monounsaturated and polyunsaturated fats - otherwise known as 'healthy fats'. These are essential for maintaining good brain function and they help the body to absorb other vitamins and minerals, especially vitamin A, D, and E. 

8. Wholegrains

An easy swap for a magnesium-rich diet is white pasta and rice to wholegrain. While levels of the mineral in wholegrains vary, Dr Newman-Beinart says, some like buckwheat offer a hugely impressive 86g of magnesium per 168g serving when cooked.

9. Dark chocolate

A square of dark chocolate has more benefits than just kicking a sugar craving and helping to reduce stress after a long day. It has 65mg of magnesium per 28g, which is approximately 15% of the daily recommended intake. 

Dark chocolate naturally contains caffeine though, so it's one of the foods you should never eat before bed

But much like many of the other foods high in magnesium, that's far from its only benefit. Dark chocolate, with at least 50% cocoa solids is high in iron, copper, and manganese, which can help maintain energy levels throughout the day, and it contains prebiotic fibre. This is the fibre that helps to feed the 'good' bacteria in the gut. 

Squares of dark chocolate in tin foil wrapping

(Image credit: Getty Images)

10. Low-fat dairy products

Low-fat dairy products like yogurt, cottage cheese, and milk are all excellent sources of magnesium, as well as being high in protein and calcium. 

For example, a standard 200g serving of low-fat, creamy Greek yogurt may can offer a good 22mg of magnesium. 

11. Soy

Soy, whether that's in beans like edamame or protein-rich tofu, is a great way to get more magnesium into your diet as well. 

Soy beans like edamame offers an impressive 64mg of magnesium per 100g serving, making it a great addition to lunches like salads and noodles, while tofu offers almost half that at 30mg per 100g, it's still 11% of the daily recommended intake. 

How can I raise my magnesium levels quickly?

The best way to raise magnesium levels quickly is through eating foods rich in magnesium that are easily digestible, like leafy greens, fruits, and dark chocolate. Otherwise, you can try a magnesium supplement designed to support whatever problem you're experiencing. 

For example, a magnesium glycinate supplement is useful for when you want to fall asleep or combat anxiety. Magnesium malate can help to raise your energy levels if you're feeling tired and magnesium citrate has an effect on the digestive system with a laxative effect that can be helpful for those with constipation. 

There are other ways of absorbing magnesium though, says nutritionist Eli Brecher. "You can also absorb magnesium through the skin by adding some Epsom salts (magnesium sulphate) to a bath," she explains. "This is a great way to soothe sore muscles and aid recovery after exercise while winding down in the evening."

Elysium Spa Natural Original Epsom Salts (1kg): £5.20 at Amazon

Elysium Spa Natural Original Epsom Salts (1kg): £5.20 at Amazon
Epsom salts are famous for relieving the aches and pains that come with exercise but they can be an all-natural way to supplement magnesium too. These salts contain magnesium sulphate, a pure mineral compound. 

Eli Brecher
Eli Brecher

Eli Brecher is a Registered Associate Nutritionist (ANutr) specialising in gut health, with a first-class degree in nutrition. She offers 1-1 nutrition consultations to individuals in her Harley Street clinic and online, works with brands and corporate companies, and shares daily recipes and nutrition tips on Instagram

What drink is high in magnesium? 

Tart cherry juice is rich in magnesium with 22mg per 100g of cherries but orange juice is a decent alternative source with just over 11mg of magnesium per 100ml. 

You can also buy specific magnesium-rich drinks, designed to supplement magnesium in liquid form. While they are more expensive adding foods rich in magnesium to your diet, can be useful as a sleep aid or hydration drink if you find you're lacking this all-important mineral. 

BetterYou Magnesium Water: £19.99 for a 12-pack

BetterYou Magnesium Water: £19.99 for a 12-pack
Each 250ml can contains 180mg of magnesium, over half of the daily recommended amount, in the form of magnesium citrate, magnesium glycinate, and Irish sea minerals. 

How do I know if I need more magnesium? 

There are several signs that you may have low magnesium levels, including:

  • Low appetite 
  • Nausea and vomiting 
  • Fatigue
  • Muscle weakness
  • Muscle spasms or tremors 
  • Abnormal heart rhythms

Studies have also estimated that around 20% of women are deficient in magnesium, says Hamilton, but this could be as high as 82% in some cases. "There are several potential reasons for this, such as chronic stress, soil depletion affecting magnesium content in crops, and eating a high-calorie, low-nutrient diet."

Low magnesium levels are also more common in older adults, adds Brecher, as magnesium absorption from the gut decreases with age. Plus, "those following a restricted diet, one low in vegetables and nuts, may not be getting enough magnesium and certain gastrointestinal conditions, such as Crohn’s and coeliac disease, have been associated with magnesium deficiency," she says. 

"Some medications may also deplete magnesium or make it harder to absorb, including blood pressure medications, antibiotics or diuretics."


As well as adding more foods rich in magnesium to your diet, you can supplement with other vitamins and minerals to ensure that as much magnesium as possible is making its way to the bloodstream. Brecher says vitamin B6 can help as it "determines how much magnesium will be absorbed." Also, she says: "Taking zinc supplements and eating calcium-rich foods at the same time as magnesium-rich foods both reduce how much magnesium you absorb, so it's a good idea to avoid having these all at the same time."

Grace Walsh
Health Channel Editor

Grace Walsh is woman&home's Health Channel Editor, working across the areas of fitness, nutrition, sleep, mental health, relationships, and sex. In 2024, she will be taking on her second marathon in Rome, cycling from Manchester to London (350km) for charity, and qualifying as a certified personal trainer.

A digital journalist with over six years experience as a writer and editor for UK publications, Grace has covered (almost) everything in the world of health and wellbeing with bylines in Cosmopolitan, Red, The i Paper, GoodtoKnow, and more.