Introduction

My sister-in-law, Sarah, went completely vegan about a year ago, mostly for moral reasons and not for health. I was three months old when she called me around midnight, half laughing and half nervous, because her calf muscles were so tense that she couldn’t keep her foot straight on the ground.
It happened again the following week, and a third time later. Around this time, she said she had been sleeping poorly for weeks, waking up at odd hours and feeling restless rather than relaxed. As a family member who finally googles everyone’s symptoms, I started to do a lot of research, and the answer came back again and again to one thing: vegan foods high in magnesium, or rather, their lack of food.
What started as a favor for Sara turned into a very useful short course for me as well, as many of these meals were not on my mind before. It also made me realize how many times “going vegan” is automatically considered healthy, without anyone carefully checking to see if certain changes actually cover the nutritional gap left after meat and milk are gone.
Table of Contents
Why Magnesium Is Easy to Miss on a Vegan Diet
Magnesium is involved in muscle contraction and relaxation, nerve signalling, blood sugar regulation, and even how well your body winds down for sleep. When levels run low, muscle cramps and restless, poor-quality sleep are two of the most common early signs.
Sara’s 2am calf cramp was the moment that finally made her mention it out loud, but looking back, the smaller signs had been there for weeks. An eyelid that occasionally twitched during meetings. A general heaviness in her legs by the evening that she had been blaming on standing too much at work.
It is not that vegan diets are inherently low in magnesium. Plenty of plant foods are excellent sources. The issue is more that many people, Sara included, default to convenience foods like bread, pasta, and plant-based ready meals once they cut out meat and dairy, without deliberately adding in the magnesium-rich whole foods that should be replacing them.
There is also a quieter factor at play. Many people associate “healthy vegan eating” with cutting things out, rather than actively adding specific nutrient-dense foods in. Sara had spent most of her energy avoiding animal products and very little thinking about what needed to fill that space nutritionally.
How We Found Out It Was Magnesium
Sara mentioned the cramps to her GP at an unrelated appointment, almost as an afterthought, and the doctor suggested a blood test given how specific and repeated the symptom was. The results showed her magnesium levels sitting at the low end of normal, not dramatically deficient, but low enough to plausibly explain both the cramps and the disrupted sleep.
Her GP explained that mild magnesium deficiency is more commonly seen in vegan and plant-based diets, partly because some plant sources contain compounds called phytates that can slightly reduce how much magnesium the body actually absorbs, even when intake on paper looks adequate.
That distinction mattered. It was not that Sara needed to eat dramatically more magnesium-containing food in theory. She needed to eat the right ones, consistently, and worry less about convenience substitutes that were quietly low in the nutrient.
Her GP also pointed out something I had not considered: cooking methods matter too. Boiling vegetables in large amounts of water can leach out some of their magnesium content, while steaming or roasting tends to preserve more of it. It was a small detail, but it changed how Sara approached cooking spinach specifically. We both ended up adjusting how we cooked vegetables generally after that conversation, not just for magnesium but for nutrient retention overall.
The 4 Vegan Foods High in Magnesium That Made the Difference
After her GP appointment, we sat down together and mapped out four foods that gave her the most magnesium for the least effort, based on what she would actually enjoy eating regularly rather than what looked impressive on a nutrition chart.
1. Spinach
A single cooked serving of spinach provides a substantial amount of magnesium, alongside iron and fibre. Sara started wilting a large handful into pasta sauces and curries, where it disappears into the dish without changing the taste much. She also began adding it to her morning smoothie a few times a week, something she picked up after we looked into dried fruits that are also naturally high in magnesium and realised how easily a few ingredients could be combined into one habit. Lightly steaming it rather than boiling became her default after that conversation with her GP.
2. Almonds
A small daily handful of almonds became Sara’s easiest win, since it required no preparation at all. Beyond magnesium, almonds also provide healthy fats, plant protein, and vitamin E, which made them feel like a genuinely useful snack rather than just a box to tick. She keeps a small jar at her desk now, similar to a habit I picked up myself after looking into plant-based proteins that also support magnesium intake. Roughly twenty almonds a day was the rough guide her GP gave her, rather than an exact prescription to follow rigidly.
3. Avocado
One medium avocado offers a meaningful amount of magnesium alongside fibre, healthy fats, and antioxidants. Sara was already eating avocado occasionally, but started having it almost daily instead, mashed onto toast for breakfast or sliced into lunch bowls, which made it an easy nutrient boost without feeling like a deliberate health intervention. It also happened to be the one change her husband adopted alongside her, mostly because he liked it on toast just as much.
4. Black Beans
Black beans quietly became the backbone of several of Sara’s dinners, providing both magnesium and a solid amount of plant protein in the same serving. She started batch-cooking a large pot at the weekend to use across the week in burritos, salads, and soups, which solved the “too tired to cook properly” problem that had been driving her toward convenience food in the first place. It became the meal-prep habit that made everything else on this list easier to sustain.
What Changed After Adding These Foods Consistently
Sara did not notice a dramatic difference in the first week, and I want to be honest about that rather than overselling it. But by around the five-week mark, the night-time cramps had become noticeably rarer, and by week eight, she could not remember the last time one had woken her up.
Her sleep improved too, though more gradually. She described it less as falling asleep faster and more as waking up feeling like the sleep had actually counted for something, rather than feeling like she had been tossing and turning all night.
This lines up with the research. Magnesium plays a documented role in regulating the nervous system and muscle function, and several studies have linked adequate magnesium intake to fewer nocturnal leg cramps and improved sleep quality, particularly in people who started from a mildly deficient baseline like Sara did.
She also mentioned, almost as an afterthought during a family dinner, that her mood had felt steadier through what would normally be a stressful work period. I am cautious about overstating that connection, since plenty of factors affect mood, but it lined up with what her GP had mentioned about magnesium’s broader role in the nervous system.
Common Mistakes Vegans Make With Magnesium
The most common mistake, and the one Sara nearly made herself, is reaching straight for a magnesium supplement instead of addressing food sources first. Whole foods deliver magnesium alongside fibre and other nutrients that support absorption, something a supplement taken in isolation cannot fully replicate.
Important:
Magnesium supplements can interact with certain medications, including some antibiotics, diuretics, and blood pressure medication, and are not recommended without medical advice for people with kidney conditions, since the kidneys are responsible for clearing excess magnesium from the body.
The second mistake is assuming that because a food is plant-based, it is automatically a strong magnesium source. White bread, white rice, and many processed vegan convenience meals contain very little, which is exactly the trap Sara had fallen into without realising it.
The third mistake is treating a single magnesium-rich meal as enough to cover a deficiency. Consistency across the week mattered far more for Sara than any one particularly nutrient-dense dinner, since the body does not store and release magnesium the way it might with some other nutrients.
How to Get Enough Magnesium on a Vegan Diet Without Overthinking It
Sara’s routine now is genuinely simple. Spinach goes into at least one meal a day, almonds live in a jar at her desk, avocado replaces butter or spread most mornings, and a batch of black beans covers two or three dinners a week without extra effort.
She has also started paying more attention to magnesium-rich seeds worth snacking on as an easy addition to salads and yoghurt, and reaches for magnesium’s role in winding down before bed on evenings when she wants a light snack before sleep rather than reaching for something processed.
Who Should Be Extra Mindful of Magnesium Intake
A few groups should pay particular attention before increasing magnesium intake significantly or considering a supplement. People with kidney conditions should speak to a doctor first, since impaired kidney function affects how magnesium is processed and cleared.
This is also worth keeping in mind if you are managing several health conditions at once, since magnesium needs and safe upper limits can shift depending on what else is going on in the body, which is exactly why food-first changes are generally considered the safer starting point compared to jumping straight to supplementation.
- Anyone on diuretics or certain blood pressure medications, due to potential interactions
- Pregnant or breastfeeding women, who should check appropriate intake levels with a GP or midwife
- Anyone with a diagnosed kidney condition, due to reduced ability to clear excess magnesium
- People already taking a magnesium supplement, before adding significantly more through diet changes
For most healthy adults, getting magnesium primarily through food, the way Sara has, carries very little risk and comes with the added benefit of fibre, protein, and other nutrients that supplements alone do not provide.
Frequently Asked Questions
What vegan foods are highest in magnesium?
Spinach, almonds, avocado, and black beans are among the most accessible vegan foods high in magnesium, alongside pumpkin seeds and dark chocolate.
Can magnesium deficiency cause leg cramps?
Yes, low magnesium levels are commonly linked to nocturnal leg cramps and muscle spasms, since magnesium plays a key role in muscle relaxation.
How much magnesium do vegans need per day?
Most adults need around 300 to 400mg of magnesium daily, though vegans may benefit from aiming slightly higher due to reduced absorption from plant sources.
Does magnesium help with sleep?
Yes, magnesium supports the nervous system and muscle relaxation, both of which contribute to improved sleep quality, particularly in people with a mild deficiency.
Should vegans take a magnesium supplement?
Not necessarily. Food-first sources are generally recommended first, with supplements considered only after consulting a doctor if a deficiency is confirmed.
Sara’s leg cramps and restless nights turned out to have a fairly simple explanation, once we actually looked for one. Four ordinary vegan foods high in magnesium — spinach, almonds, avocado, and black beans — made a genuine difference within a couple of months, without supplements or anything complicated. If you are on a plant-based diet and dealing with similar symptoms, these four foods are a sensible place to start, and a blood test is a sensible next step if symptoms persist beyond a few weeks of dietary changes.
Medical Disclaimer:
This article is for informational purposes only and does not constitute medical advice. Please consult your GP before making significant dietary changes or starting any new supplement, particularly if you have an existing health condition.
