यह पेज हिंदी में भी उपलब्ध है हिंदी में पढ़ें
Vitamins & Supplements

Magnesium Benefits: Sleep, Cramps, Migraine and Best Form

What magnesium does, signs of low intake, the evidence for sleep, cramps, migraine and constipation, the best foods and safe supplements.

In this guide

  • What it does and how much you need
  • Signs of low intake and who is at risk
  • What the evidence says
  • Magnesium for headaches and migraine: how much and how fast?

8 min readLast updated:

Based on 5 trusted sources · NHS, research, NIH
Mg
In this guide

Magnesium is sold for sleep, stress, cramps and headaches, but only some claims hold up. Here is what it does, who runs low, the best foods, which form to take and the safe limits.

What it does and how much you need

Magnesium helps over 300 enzymes make energy, protein and DNA, and keeps nerves, muscles, heartbeat and bones working.

Healthy kidneys hold on to magnesium when intake is low and pass out the extra, so they are key to supplement safety.

  • India (ICMR-NIN 2020): about 440 mg a day for men, 370 mg for women.
  • US: 400 to 420 mg for men, 310 to 320 mg for women.
  • Europe (EFSA): 350 mg for men, 300 mg for women.

Signs of low intake and who is at risk

Early signs are vague: tiredness, poor appetite, nausea and weakness. Serious deficiency usually has a medical cause and can bring twitches, cramps, tingling, irregular heartbeat and low calcium and potassium.

Blood tests are a rough guide: under 1 percent of body magnesium is in the blood, so a normal result (around 0.75 to 0.95 mmol/L) does not rule out low stores.

  • Diet: mostly polished rice, maida and processed food.
  • PPIs: omeprazole, pantoprazole or similar for over three months.
  • Diuretics: regular loop or thiazide water pills.
  • Diabetes: type 2, especially if poorly controlled.
  • Gut problems: chronic diarrhoea, coeliac disease, Crohn's or past bowel surgery.
  • Others: heavy drinkers and older adults, who absorb less and lose more.

What the evidence says

Magnesium is not a cure-all; only a few uses are well supported.

Migraine doses studied (often 400 to 600 mg a day) are above the supplement upper limit, so take them only under medical supervision.

  • Constipation, good evidence: oxide and milk of magnesia (hydroxide) are gentle laxatives for short-term use.
  • Migraine, moderate evidence: trials show fewer migraine days; judge after 2 to 3 months.
  • Sleep, weak evidence: slightly better sleep in small studies, mostly of older adults with low intake.
  • Stress and anxiety, weak evidence: possible mild benefit if you are low.
  • Cramps, little or no evidence: unlikely to prevent night leg cramps in older adults (Cochrane); mixed in pregnancy.

Magnesium for headaches and migraine: how much and how fast?

Magnesium is one of the better-studied supplements for preventing migraine. The US National Institutes of Health call it “possibly effective” for fewer migraines, and the German migraine guideline lists 600 mg a day (usually 300 mg twice daily) as an option to try, while rating the evidence as low. The effect is modest: in studies some people had fewer migraine days, while others noticed no change.

It is not a quick painkiller. Magnesium tablets do not stop a headache that has already started; the studies looked at daily use over two to three months. Keep a headache diary so that after 8 to 12 weeks you can tell whether it helps you.

The doses used for migraine are higher than what is usually advised for supplements without medical supervision, and loose stools are the most common side effect. Talk to your doctor before you start, and do not take magnesium on your own if you have kidney disease. More is not better: 800 mg or above brings more side effects, not more benefit.

  • Typical study dose: 400–600 mg a day, split into two doses
  • Give it 8–12 weeks before you judge
  • Glycinate is usually gentlest on the bowel; citrate and oxide loosen stools more easily
  • Not for an acute attack, and only with medical advice in kidney disease or pregnancy

Step by step

  1. Talk to your doctor first, especially if you have kidney problems, are pregnant or take regular medicines.
  2. Start a headache diary: note the days with headache, how strong the pain was and which painkillers you took.
  3. Take the dose you agreed with your doctor, split into a morning and an evening dose, with food.
  4. Keep the diary going and review it with your doctor after 8 to 12 weeks.
  5. Stop if you notice no change by then, or earlier if you get diarrhoea or other side effects.
Magnesium for headaches at a glance
QuestionShort answerNote
Does it help migraine?It may help prevent migraine, but the effect is modest.Some people have fewer migraine days; others notice no change.
And tension-type headache?The studies have mainly looked at migraine.Whether it helps everyday tension-type headache is unclear.
Typical study dose400–600 mg a day, split into two doses.This is above the supplement upper limit, so only under medical advice.
How fast does it work?Slowly: it is a daily preventive, not a painkiller for an attack.Judge after 8–12 weeks with a headache diary.
Which form?Glycinate is usually gentlest on the bowel.Citrate and oxide loosen stools more easily.
Who should not take it on their own?People with kidney disease.In pregnancy, only with your doctor’s advice.

The best food sources

Food comes first: seeds, nuts, beans, greens and whole grains are rich in magnesium, and refining strips most of it.

  • Pumpkin seeds, 30 g: about 150 mg.
  • Nuts, 30 g: cashews about 80 mg, almonds about 75 mg.
  • Whole grains: ragi flour (100 g) about 140 mg; cooked brown rice (half cup) about 40 mg.
  • Spinach (palak), half cup cooked: about 75 mg.
  • Beans: rajma, chana or black beans (half cup cooked) about 40 to 60 mg.
  • Curd and banana: a cup of curd about 40 mg, a banana about 30 mg.

How to choose a supplement

Daily whole grains, dal, nuts, seeds and greens may make a supplement unnecessary. The upper limit from supplements is 350 mg a day (US) or 250 mg (EU), food not included; go higher only under medical supervision.

Citrate, glycinate and chloride seem better absorbed than oxide; malate absorbs fairly well, but its fatigue and muscle-pain claims are thin.

  • Form: glycinate for a sensitive stomach, citrate if constipated; oxide only as a laxative.
  • Dose: 100 to 250 mg elemental magnesium a day (not compound weight); more is not better.
  • Testing: prefer USP or NSF third-party seals.
  • India: insist on an FSSAI licence number on the label.
  • Price: compare cost per daily dose of elemental magnesium, not per bottle.
  • Avoid: blends that hide amounts, mega-doses and claims to cure anxiety, insomnia or diabetes.

Myths and facts

MythA magnesium tablet stops a headache that has already started.

FactMagnesium tablets are not a quick painkiller. Studies looked at daily use to prevent migraine, and whether it helps can only be judged after 8 to 12 weeks.

MythThe more magnesium you take, the better.

FactMore is not better. From supplements, stay within the upper limit unless your doctor advises more; 800 mg or above brings more side effects, such as diarrhoea, but no extra benefit.

MythMagnesium fixes night leg cramps.

FactA Cochrane review found that magnesium is unlikely to prevent night leg cramps in older adults, and results in pregnancy are mixed.

MythAll forms of magnesium are the same, and oxide is best absorbed.

FactCitrate, glycinate and chloride seem better absorbed than oxide. Oxide works mainly as a gentle laxative, and glycinate is usually gentlest on a sensitive stomach.

Natural & Ayurvedic remedies

Seeds and nuts

How: Eat about 30 g of pumpkin seeds, almonds or cashews daily, alone or on poha, upma or salad.

Why it helps: 30 g of pumpkin seeds gives about a third of daily needs.

Ragi and other whole grains

How: Swap some white rice or maida for ragi, bajra, jowar, brown rice or whole-wheat atta.

Why it helps: Whole grains keep the magnesium-rich outer layer lost in polishing.

Dal, rajma and chana

How: Have dal or a legume curry daily, and sprouted moong as a snack.

Why it helps: Pulses add magnesium plus fibre and protein, key for vegetarians.

Green leafy vegetables

How: Add palak, methi or chaulai to dal, parathas or sabzi most days; keep the cooking water.

Why it helps: Magnesium is part of chlorophyll and leaches into cooking water.

Products that may help

Affiliate links · no extra cost to you

As an Amazon Associate we earn from qualifying purchases; links to other Indian shops are affiliate links too, at no extra cost to you. Ask your doctor before taking any supplement, especially if you are pregnant or on medicines.

Products that may help

Affiliate links · no extra cost to you

As an Amazon Associate we earn from qualifying purchases, at no extra cost to you. Check with your doctor before starting any supplement, especially if you are pregnant or take medicines.

Daily habits

  • Build meals around a whole grain, a dal and a green vegetable.
  • Snack on seeds and nuts instead of biscuits or chips.
  • Take supplements with food, starting with a low dose.
  • Keep magnesium at least 2 hours apart from thyroid tablets, antibiotics and osteoporosis medicines, unless your doctor says otherwise.
  • Cut alcohol and sugary drinks, which raise magnesium loss in urine.

Questions people ask

What are the main benefits of magnesium?

It supports nerves, muscles, energy, heart rhythm and bones. As a supplement, the best evidence is for constipation and, under medical guidance, migraine prevention; it is weak for sleep, stress and cramps.

Does magnesium help with headaches and migraine?

It may help prevent migraine in some people when taken daily for two to three months. Study doses are 400 to 600 mg a day and should be agreed with a doctor. It does not work fast enough to stop a headache that has already begun.

How fast does magnesium work for headaches?

Not fast. Magnesium tablets do not stop a headache that has already started; in studies they were taken daily for two to three months to prevent migraine. Keep a headache diary and judge after 8 to 12 weeks whether you have fewer migraine days.

Which magnesium is best for migraine?

Studies used different forms, such as citrate and oxide, usually at 400 to 600 mg a day split into two doses and agreed with a doctor. Glycinate is usually gentlest on the bowel, citrate and oxide loosen stools more easily, and citrate seems better absorbed than oxide. Ask your doctor which form and dose suit you.

Which magnesium is best for sleep?

Glycinate is popular because it is gentle on the stomach, but no form is proven for sleep. A regular bedtime, less caffeine and a calm evening matter more.

How much magnesium can I take safely?

Food magnesium is safe for healthy people; from supplements, stay within 350 mg a day (US) or 250 mg (EU) unless your doctor prescribes more. Diarrhoea is the first sign of too much.

Should I take magnesium in the morning or at night?

Taking it regularly matters more than timing, and with the evening meal it upsets the stomach less. Keep it at least 2 hours away from medicines it interferes with.

Can I get enough magnesium from a vegetarian diet?

Yes: ragi, bajra, dal, beans, nuts, seeds and leafy greens are excellent sources. Diets built on polished rice, maida and processed snacks fall short.

Sources and further reading5
  1. Vitamins and minerals: Others (including magnesium and selenium)NHS
  2. The Effects of Magnesium Supplementation on Subjective Anxiety and Stress: A Systematic ReviewBoyle NB et al., Nutrients, 2017
  3. Headaches: What You Need To KnowNational Center for Complementary and Integrative Health (NCCIH), NIH
  4. Magnesium and MigraineDominguez LJ et al., Nutrients (via PubMed Central, NIH), 2025
  5. Magnesium als Option zur Migräne-Vorbeugung (on the German S1 guideline “Therapie der Migräneattacke und Prophylaxe der Migräne”)Pharmazeutische Zeitung

How we write our guides →

Be careful · when to see a doctor

  • Do not take magnesium supplements with kidney disease or reduced kidney function unless your doctor advises it, as magnesium can build up to dangerous levels; pregnant women, children and anyone on regular medicines, especially diuretics, digoxin or PPIs, should ask a doctor first.
  • Keep magnesium 2 to 4 hours apart from tetracycline and quinolone antibiotics, bisphosphonates for osteoporosis and levothyroxine, whose absorption it reduces.
  • Excess from supplements or laxatives causes diarrhoea, and very high doses can cause low blood pressure, weakness, irregular heartbeat and rarely cardiac arrest; see a doctor promptly for muscle twitching, palpitations or persistent weakness.

This guide is for general education and does not replace advice from a doctor. Practise gently, never into pain, and speak to a qualified professional if you have a health condition, are pregnant or take medication.

About this guide

Free PDF

The 15-minute back pain plan

The full back pain chapter from our e-book: why it hurts, a daily illustrated yoga routine and natural care. Free to download.

  • 6 illustrated pages
  • A routine of 15 minutes a day
  • Instant download
Get the free plan

Enter your email on the next page to download it. No spam.

Prakriti: Yoga and Nature Cure for Everyday Health

E-book · PDF

PrakritiYoga and nature cure for everyday health

Take the practice further with 38 illustrated pages: step-by-step routines for back pain, joints, cough, fever, acidity, sleep and more, plus home nature-cure therapies and a 21-day plan.

  • 38 illustrated pages
  • PDF, read on any device
  • Routines of 15–30 minutes

The e-book is written in English.

In India? Pay ₹101 with UPI · Google Pay, PhonePe or QR code