Migraine prevention

Preventing Migraine and Headache

Preventing migraine and headache starts with regular sleep timing, above all a consistent wake time held on weekends. Next come regular meals and fluids and regular moderate aerobic exercise. Treating the anxiety, depression and post-traumatic stress that travel with headache improves headache outcomes, not just mood. A real vitamin D deficiency is worth correcting.

Stopping attacks is half the job. The other half is having fewer of them. That work is largely metabolic, autonomic and circadian (body-clock) rather than drug-based.

What follows is graded honestly. Some of it has as much evidence behind it as any drug on this site. Some of it is promising and not yet proven, and is labeled that way. Lifestyle advice in headache is often handed out as a vague list. Nothing says which items actually carry weight. That is why people give up on all of it at once.

How does sleep help prevent migraines?

STRONGEST LIFESTYLE LEVER

Sleep and headache affect each other both ways. Poor sleep provokes attacks, and attacks wreck sleep. But for prevention, the first direction is the one that matters. Insomnia is an established risk factor for episodic migraine becoming chronic. Irregular sleep timing is one of the most reliable attack triggers people can find in their own diaries.

The step with the best evidence is not more sleep — it is more regular sleep. A consistent wake time, held on weekends, does more than an extra hour on a Sunday. Weekend lie-ins are a classic trigger precisely because they shift the body clock.

Two things are worth screening for rather than managing at home. Obstructive sleep apnea causes morning headache and is very commonly missed. That is especially true in people who do not fit the expected picture. And cluster headache has a striking habit of striking from sleep at the same hour. That is a diagnostic clue, not a sleep problem.

Can vagus nerve stimulation prevent migraines?

DEVICE EVIDENCE MODERATE, LIFESTYLE EVIDENCE INDIRECT

The vagus nerve is the main parasympathetic (rest-and-digest) pathway between brainstem and body. It connects into the trigeminocervical complex — the same relay that generates headache pain. That anatomical link is why vagal modulation (changing vagus nerve activity) is a credible target, not a wellness slogan.

Non-invasive vagus nerve stimulation — a handheld device held against the neck — has randomized evidence in cluster headache. That is its better-supported use. Its evidence in migraine is more modest. It is drug-free and repeatable. That makes it attractive for people who cannot tolerate or should not take preventives.

The lifestyle version of the same idea is raising vagal tone. You do it through slow-paced breathing, and through anything that reliably improves heart-rate variability. Be clear about the evidence gap. HRV is a good marker of how the autonomic (automatic) nervous system is set, and the breathing work reliably shifts it. But the trials linking that shift to fewer headache days are small. It is low-cost and low-risk, which is a reasonable basis for trying it — not the same as a proven treatment.

Does what and when you eat affect migraines?

EMERGING

Migraine shows up with insulin resistance and with gut disorders far more often than chance explains. People with migraine have markedly higher rates of irritable bowel syndrome, and the association runs in both directions. Several shared mechanisms have been proposed — systemic inflammation, serotonin signaling in the gut, the gut–brain axis. They are biologically plausible. They are not yet shown to be the cause.

What is practical now: eating regularly matters more than eating any particular thing. Skipped meals and the glucose swings that follow are among the most consistently reported triggers. You can fully control them. Dehydration behaves the same way.

Elimination diets that hunt for single trigger foods have a poor record and a real cost. People end up eating less, and less regularly, which is itself a trigger. If you are chasing a food trigger and getting nowhere, the fasting may be doing more harm than the food.

Which vitamins and supplements help prevent migraines?

MIXED — WORTH MEASURING, NOT ASSUMING

Low vitamin D is consistently associated with migraine across observational studies. Supplement trials paint a weaker and less consistent picture. Several show a drop in headache frequency, and others show little. The clearest benefit tends to appear in people who were truly deficient to begin with.

The sensible reading is to measure it rather than guess, and to correct a real deficiency. That is worth doing for reasons beyond headache anyway. Supplementing an already-normal level to chase a headache benefit is not supported.

Three others have a longer track record in migraine prevention and are inexpensive: magnesium, riboflavin (vitamin B2) and coenzyme Q10. None is dramatic. All take weeks to months to show anything. They are best judged against a headache diary rather than an impression.

Two more that earn their place

Aerobic exercise has reasonable trial evidence in migraine prevention. In some studies it is comparable to a preventive medication. Regular and moderate beats occasional and hard. An abrupt intense session can itself provoke an attack.

Caffeine cuts both ways. It helps acutely, and daily use builds dependence. Then a late or missed coffee becomes a withdrawal headache. If you drink it daily, what matters is keeping the timing consistent.

Do anxiety and depression make migraines worse?

STRONG AND BIDIRECTIONAL

Headache is not a psychological condition. It becomes a psychological problem because of what it does to your life.

That distinction is the whole section, so it is worth being precise about which way the arrow points. Migraine is a neurological disease with a genetic basis. It is not caused by stress. It is not a sign of anxiety. It is not what happens to people who cannot cope. Being told otherwise is one of the most common and most damaging things people with headache disorders report. And it is wrong.

What the disease does do is isolate you. Attacks are unpredictable, so you stop committing to things. You cancel, and then you stop being asked. You leave events early. You work through attacks you should not be working through. You spend the bad days alone in a dark room because the illness demands it. There is nothing to see, so the people around you cannot judge how bad it is. Some of them quietly decide you are exaggerating. Many patients have been told as much by a clinician.

Withdrawal, unpredictability, loss of work and social role, and not being believed are the standard ingredients of depression and anxiety in any population. Here they arrive as results of the disease, not as its cause. The comorbidity (the illnesses that come with it) is real and worth treating — but it comes downstream.

Then the relationship becomes a circle, and that is the part that matters clinically. Once anxiety and low mood set in, they worsen headache frequency and treatment response. The worsening headache deepens the isolation. Post-traumatic stress disorder shows up more than expected in headache clinics. It is disproportionately found in chronic rather than episodic migraine.

Anxiety in particular tends to be underestimated. Across studies it is at least as strongly associated with migraine as depression. Yet it is asked about far less often.

Why we screen for it

Untreated mood and anxiety disorders are among the clearest risk factors for episodic headache turning chronic. They also predict poorer response to headache treatment. And they raise the risk of the medication-overuse pattern, because more distress means more frequent acute dosing.

The flip side is the useful part: treating the comorbidity improves headache outcomes, not just mood. Some preventives address both at once. Cognitive behavioral therapy and mindfulness-based approaches have genuine trial evidence in migraine. They are not a substitute for medical treatment. They work alongside it, with effect sizes that would be taken seriously in any other part of this site.

So we ask. Not to say your headache comes from your state of mind. We ask because the disease has been isolating you, and that isolation has a cost. Leaving that cost unaddressed makes the headache itself harder to treat.

If you are in crisis, call or text 988 for the Suicide and Crisis Lifeline, 24 hours a day.

The thing to fix first

None of the above will outrun a medication-overuse cycle. Are you treating headache on more than about ten to fifteen days a month? Then that is the main thing driving your headache frequency. It should be addressed before judging whether anything else is working.

Frequently asked questions

What is the number one cause of migraines?

Migraine is a neurological disease with a genetic basis. It is not caused by stress. It is not a sign of anxiety or of failing to cope. Single attacks do have triggers. The most reliable ones people find in their own diaries are irregular sleep timing, skipped meals, dehydration and a late or missed daily coffee.

Can you prevent migraines without medication?

Much of prevention is not drug-based. Keep a consistent wake time, weekends included. Eat regular meals, drink enough fluid and do regular moderate aerobic exercise. Have your vitamin D measured and correct a real deficiency. Slow-paced breathing is low-cost and low-risk, though its trials are small. Judge all of it against a headache diary rather than an impression.

Does caffeine help or cause migraines?

Both. Caffeine helps acutely, but daily use builds dependence. Then a late or missed coffee becomes a withdrawal headache. If you drink it every day, what matters is keeping the timing consistent. Regular timing, like regular sleep and regular meals, runs through every prevention step on this page.

Does exercise help prevent migraines?

Yes. Aerobic exercise has reasonable trial evidence in migraine prevention. In some studies it is comparable to a preventive medication. Regular and moderate beats occasional and hard, because an abrupt, intense session can itself provoke an attack. Keep the routine steady and moderate. Do not save it for one hard session a week.

Can taking too many painkillers cause more headaches?

Yes. Treating headache on more than about ten to fifteen days a month can set up a medication-overuse cycle. In that cycle, the daily acute treatment keeps the daily headache going. None of the other prevention steps will outrun that cycle. So it should be addressed first, before judging whether anything else is working.

Sources

  1. Varkey E, Cider A, Carlsson J, et al. Exercise as migraine prophylaxis: a randomized study using relaxation and topiramate as controls. Cephalalgia, 2011. PMID 21890526. pubmed.ncbi.nlm.nih.gov
  2. Stanyer EC, Creeney H, Nesbitt AD, et al. Subjective Sleep Quality and Sleep Architecture in Patients With Migraine: A Meta-analysis. Neurology, 2021. PMID 34551985. pubmed.ncbi.nlm.nih.gov
  3. Hu C, Fan Y, Wu S, et al. Vitamin D supplementation for the treatment of migraine: A meta-analysis of randomized controlled studies. The American journal of emergency medicine, 2021. PMID 34879503. pubmed.ncbi.nlm.nih.gov