There’s a reason why everyone is talking about magnesium. The nutrient can support essentially every aspect of health. Dealing with sore muscles? Having trouble falling asleep? Feeling anxious lately? Magnesium’s got you.
Required in more than 300 processes in the body, magnesium just might be the biggest multitasking nutrient there is. Yet another benefit magnesium can add to its resume is migraine management. “Magnesium can help with migraines, both during an attack and for migraine prevention. Studies show that it can reduce migraine frequency, intensity, and duration,” says Danielle Wilhour, MD, a neurologist and headache specialist at UCHealth.
If you’re going to use magnesium for migraines, it’s important to know what types of migraines it helps with, how much you need to consume, and the best way to get it.
Magnesium’s role in migraine treatment
Magnesium is a micronutrient that’s found in foods like grains, fruit, vegetables, and fish. While there is a correlation between being deficient in magnesium and getting migraines (as shown in a 2011 study published in Neurosciences), David Curfman, MD, a neurologist specializing in headache management and an associate professor at Vanderbilt University, says it’s unclear if consuming too little magnesium actually causes migraines. And it's worth noting that, since magnesium is found in such a wide range of foods, it’s not a deficiency most people in the U.S. experience anyway.
If you really want to use magnesium as a way to stop getting migraines, Shivang Joshi, MD, a neurologist specializing in headache medicine, says it’s important to get more magnesium than the recommended daily requirement of between 310 and 420 milligrams a day. This is the way, he says, to get an actual pharmacological benefit from magnesium when it comes to migraines. When patients see him for migraines, Dr. Joshi says he typically recommends they supplement with 400 milligrams of magnesium once a day and then increase to twice a day. This is the dosage Dr. Curfman and Dr. Wilhour recommend too.
When magnesium is consumed at this amount, all three neurologists say it can play a key role in migraine prevention. The American Academy of Neurology and the American Headache Society also back this claim.
Dr. Joshi explains that magnesium helps prevent the nervous system from becoming too excitable, something that can cause migraines. He adds that magnesium also makes the brain less reactive to environmental stimuli that are common migraine triggers, like changes in weather, bright lights, or strong odors.
“If you imagine the [nervous system] as an electrical circuit, what magnesium does is block the entry of calcium from entering cells through receptors called NDMA [a protein complex found in nerve cells]. Magnesium blocks the NMDA receptors where calcium binds, preventing calcium from entering the cells. This is important because calcium is responsible for nerve signal activation,” Dr. Joshi explains.
In other words, less nerve signal activation means a less excited nervous system, and a less excitable nervous system means fewer migraines.
All three neurologists say that supplementing with magnesium is especially helpful for migraines with aura—which is a migraine accompanied by sensory disturbances such as tingling, blind spots, or flashing lights—though Dr. Curfman says that it isn’t exactly known why it’s especially helpful for this specific type of migraine.
Tips for taking magnesium for migraines
As Dr. Joshi previously explained, getting enough magnesium through food isn’t enough to treat migraines; you need to take a supplement. In terms of the best type of magnesium to supplement with, Dr. Wilhour says that magnesium citrate and magnesium oxide at doses of 400 to 600 milligrams daily are the most commonly recommended, based on clinical trial evidence.
“These formulations are preferred primarily because they have been specifically studied in randomized controlled trials demonstrating efficacy, are widely available, and are generally well-tolerated,” she said.
When it comes to deciding between magnesium citrate and magnesium oxide, Dr. Wilhour says that both work; it just depends on which one is better tolerated by your body. “The main side effect from magnesium supplementation is gastrointestinal intolerance, which can vary between formulations. Some clinicians prefer magnesium citrate because it can be better absorbed and tolerated,” she explains. If you’re experiencing any gastrointestinal issues from your magnesium supplement, she recommends dropping the dose down to 200 milligrams and gradually working your way up to 400 milligrams.
If you’re taking a magnesium supplement to prevent migraines, Dr. Joshi says that it can take between six to eight weeks for it to start working, but once it does, people find that it supports their health in other ways besides preventing migraines, such as helping with workout recovery, mood, and sleep.
Magnesium can also help treat migraines in the moment, too. All three neurologists say that in this case, magnesium is administered through an IV by a medical professional. “It’s one of the elements in an IV cocktail, which includes other anti-nausea and anti-inflammatory medications,” Dr. Joshi says.
Given all that it does for the body, it’s not all that surprising that magnesium can help with migraines. While many people do find it helpful, all three neurologists emphasize that it isn’t always a magic bullet.
Migraines are complicated and treatment isn’t one-size-fits-all. But they’re also something no one should have to live with. If you’re dealing with migraines regularly, get an appointment on the books with your healthcare provider. Your treatment plan likely will include magnesium, but you may need some additional interventions too.

