Magnesium and Migraine
Reviewed by: HU Medical Review Board | Reviewed March 2022 | Last updated: June 2022
Magnesium is a mineral that is important for many functions in the body, including the production of protein, management of blood sugar, regulation of blood pressure, and the normal function of muscles, nerves and the rhythm of the heart. It also helps the cells produce energy and helps transport calcium and potassium ions across cell membranes.1
More than half of the body's magnesium is stored in the bones. Most of the rest of the magnesium in the body is in the soft tissues, with less than 1% being present in the blood. Magnesium is normally secreted out of the body in the urine, with the kidneys filtering out what the body does not need.1
Magnesium and migraine
Magnesium plays a part in blocking pain pathways and has depressant effects on nerves and smooth muscle which are both thought to play a role in relieving migraine symptoms.2
As the typical dose of magnesium used for migraine prevention exceeds the usual recommended amount, magnesium should be used with your doctor's knowledge. Talk to your doctor about all medications, vitamins, and supplements you are taking.1
Food containing magnesium
Magnesium is widely found in foods, including:1
- Green leafy vegetables
- Legumes, like beans
- Nuts
- Whole grains
- Seeds
- Soy products
- Bananas
- Peanut butter
- Avocados
Magnesium to treat migraine
One pilot study that evaluated 40 people with migraine found that during a migraine attack, 50% of them had low levels of magnesium in the brain. The intravenous (IV) administration of magnesium appeared to reduce the pain of the migraine in about 50% of these patients.2,3
Low magnesium levels may also be related to menstrual migraine and may have a deficiency of magnesium. Low levels of magnesium were more commonly found during menstrual migraine compared to migraine that occurred at other times.2
Studies on magnesium and migraine
Several small studies have found that oral supplementation of magnesium may reduce the frequency and severity of migraine attacks. In one study from 1996 of 81 people with migraine who were randomly assigned magnesium or a placebo, magnesium supplementation reduced the frequency of attacks by 41.6% compared to 15.8% in the placebo group.2,4 More recently, a 2008 study compared magnesium supplementation given to 30 patients compared to 10 patients given placebo. The study found that treatment with magnesium resulted in a significant decrease in migraine attack frequency and severity.2,5
Formulations of magnesium available
As a natural remedy, magnesium supplements are available to purchase without a prescription in a variety of forms, including:6
- Powder
- Capsule
- Liquid
- Syrup
- Tablet
Magnesium injections are given only by or under the supervision of a healthcare professional.

Community Poll
Was magnesium effective in relieving your migraine symptoms?
Side effects and other precautions
The most common side effect of magnesium, especially high doses of the mineral, is diarrhea. Rarely, other side effects may occur, including:6
- Dizziness or fainting
- Flushing (redness in the skin)
People with kidney disease or kidney failure have a higher risk of problems from high doses of magnesium because the kidneys no longer removes the extra magnesium. Too much magnesium can be toxic in the body and may cause serious or potentially fatal side effects, including muscle weakness, difficulty breathing, extreme low blood pressure, vomiting, and heart attack.1 These are not all the possible side effects of magnesium. Patients should talk to their doctor about what to expect with treatment with magnesium.
Who should not take magnesium?
People with kidney failure should not use magnesium supplements.
Several medications can affect the levels of magnesium in the body, including antibiotics, bisphosphonates, diuretics, and proton pump inhibitors. Talk to your doctor about all medications (over-the-counter and prescription), vitamins, and supplements you are taking.1
Women who are pregnant or breastfeeding, or who plan to become pregnant or breastfeed, should talk to their doctor about the safety of using natural remedies like magnesium.

Community Poll
How would you rate the side effects you experienced with magnesium?
As always, the best source for advice on treating migraine is your own migraine specialist. These descriptions of natural remedies are provided only for informational purposes. You should begin no medication or supplement without first checking with your health care provider and should let them know of any other prescriptions, OTCs, and herbals you are taking to ensure there are no interactions.