Fasting and Migraines

Skipping meals and going a long time without food is one of the most commonly reported migraine triggers. That makes intermittent fasting a real concern for people with migraine. At the same time, some small studies of ketogenic diets have reported fewer migraine attacks, which has led to interest in whether fasting could help. That question has not been answered: there is no good evidence that intermittent fasting prevents migraines, and it should not be used as a migraine treatment.

This page explains why fasting can trigger headaches and migraines, what the research does and does not show, and practical steps to lower your risk if you and your healthcare provider decide that fasting is reasonable for you.

Before You Start

If you have migraine, talk to your doctor or headache specialist before trying intermittent fasting, especially if you have frequent or chronic migraine, take preventive or acute migraine medication, have diabetes, or are pregnant. Seek urgent care for a sudden, severe "worst ever" headache, or a headache with weakness, confusion, difficulty speaking, vision loss, fever, or a stiff neck.

Why Fasting Can Trigger Migraines

Fasting-related headaches are common, and people with migraine often list missed meals as a trigger. Several factors may be involved, and they often overlap:

  • Long gaps without food. Missing meals is a well-recognized trigger, although the exact reason is not fully understood. Changes in blood sugar and in the brain's energy supply are thought to play a role.
  • Dehydration. People who are fasting sometimes drink less than they realize, and dehydration is itself a common headache trigger.
  • Fluid and electrolyte shifts. In the first days of fasting, the body tends to lose more water and sodium, which may contribute to headaches and lightheadedness.
  • Caffeine changes. Drinking more or less coffee than usual, or having it later than usual, can trigger caffeine-withdrawal headaches.
  • Sleep changes. A new routine can disturb sleep, and both too little and irregular sleep are common migraine triggers.

For many people, headaches are most likely in the first days to weeks of a new fasting schedule, while routines are changing.

Can Fasting Reduce Migraines? What Research Shows

The idea that fasting might help some people with migraine comes mainly from research on ketogenic diets, not from studies of intermittent fasting itself:

  • Ketogenic diets: a number of small, mostly short-term studies have reported fewer migraine days in some participants on ketogenic or very-low-carbohydrate diets. These studies are small, often not blinded, and some involved weight loss, so the results are promising but not conclusive. Ketogenic diets for migraine are typically done with medical supervision.
  • Intermittent fasting: there is very little direct research on intermittent fasting and migraine. It has not been shown to prevent attacks.
  • Possible indirect effects: for some people, a regular eating schedule, fewer late-night meals, less alcohol, weight loss, or better sleep could influence headaches. These effects vary and are not specific to fasting.

In short, fasting is a known trigger for many people with migraine, and any potential benefit is unproven. Established migraine treatments and preventive medications should not be replaced with a fasting plan.

What to Expect Over Time

The First Few Weeks: Higher Risk

If fasting is going to trigger headaches, it most often happens early, when meal timing, caffeine, fluids, and sleep are all changing. The steps in the next section aim to reduce this risk.

After the First Few Weeks

Some people find that headaches settle once they are used to a consistent routine. Others continue to get attacks whenever they go too long without food. There is no way to predict which group you will fall into.

When to Stop

If your migraines become more frequent, more severe, or harder to treat, or if you need acute medication more often, stop fasting and talk to your healthcare provider. Using acute migraine medication very often can itself lead to medication-overuse headache.

Lowering the Risk if You Fast

If you and your healthcare provider decide that trying a fasting schedule is reasonable, these steps may make attacks less likely:

Start Gently

Begin with a 12-hour overnight fast, for example 8pm to 8am, which mostly overlaps with sleep. Extend slowly, perhaps 30 minutes at a time every week or two, and only if you have no increase in headaches. For many people with migraine, a modest window such as 12:12 or 14:10 is the most comfortable limit. See our beginner's guide to fasting.

Drink Enough and Keep Electrolytes in Mind

Drink water regularly through the fast. Salting food normally and eating potassium-rich foods such as vegetables, beans, and potatoes may help. Some people add a small pinch of salt to water during a fast. If you have high blood pressure, heart disease, or kidney disease, or have been told to limit salt, check with your doctor first. See electrolytes and fasting.

Keep Caffeine Consistent

Keep the same amount and timing of caffeine you had before you started fasting. If you want to cut down, do it gradually and separately from starting a fasting schedule.

Ask About Magnesium

Magnesium is one of the supplements some headache guidelines consider for migraine prevention, though the evidence is moderate. It can cause diarrhea and interacts with some medications, and people with kidney disease should not take it without advice. Ask your doctor or pharmacist whether it is appropriate for you and at what dose.

Protect Your Sleep

Keep a regular bedtime and wake time. Avoid starting a new fasting schedule during travel, shift changes, or other periods when your sleep is already disrupted.

Eat Proper Meals in Your Window

Eat balanced meals with protein, fiber-rich carbohydrates, and some fat. Avoid squeezing everything into one small meal or skipping meals within your eating window.

Tracking Your Own Triggers

Migraine triggers differ from person to person. A headache diary kept for a few weeks before and after changing your eating schedule can help you and your doctor spot patterns. Record:

  • Date, time, severity (1-10), and duration of each headache
  • When you last ate and what you ate
  • How much you drank
  • Sleep the night before
  • Caffeine and alcohol
  • Stress level
  • Menstrual cycle phase, if relevant
  • Weather changes and any medication taken

Sometimes fasting itself is not the main issue; a related change such as less fluid, disturbed sleep, or different caffeine intake turns out to matter more.

If a Migraine Starts During a Fast

Do not try to push through a migraine to keep a fast going. Treating the attack early matters more.

  1. Follow your usual treatment plan. Take the acute medication your doctor has recommended, as directed. Some medications, such as anti-inflammatory painkillers, are better taken with food.
  2. Eat and drink. End the fast with a small meal or snack and water. Food is often part of what helps.
  3. Caffeine only if it is part of your usual routine or plan. Some people find their regular coffee helps; others find it makes things worse.
  4. Rest in a dark, quiet room if you can.
  5. Seek medical help if the headache is unusually severe, different from your usual migraines, or comes with neurological symptoms such as weakness, confusion, or difficulty speaking.

Chronic Migraine Considerations

Chronic migraine is usually defined as headache on 15 or more days a month for more than three months, with migraine features on at least 8 of those days. It needs individual medical care, and fasting decisions deserve extra caution:

  • Discuss any change in eating schedule with your doctor or headache specialist first
  • If you try it, use a very gradual approach and track your headaches closely
  • Medication-overuse headache should be assessed and managed by your doctor; fasting is not a way to address it
  • Stop if your headache days increase

Frequently Asked Questions

I get a migraine every time I skip breakfast. Should I stop trying to fast?

It may simply be that longer fasts do not suit you, and that is fine. If you still want to try, talk to your doctor and consider a 12-hour overnight fast (for example 8pm to 8am) with plenty of fluids. If that also triggers attacks, regular meals are the better choice for you.

Why can coffee both help and trigger my migraines?

Caffeine is an ingredient in some headache medications and can ease some headaches. But regular caffeine users can get withdrawal headaches if they have less than usual or have it later than usual. Keeping your intake consistent is usually the safest approach.

Is a ketogenic diet better than fasting for migraines?

There is more research on ketogenic diets for migraine than on intermittent fasting, but it is still limited and mostly from small studies. Neither is an established migraine treatment. A ketogenic diet is a big change and is best done with guidance from your doctor or a dietitian.

What about menstrual migraines?

Migraines linked to the menstrual cycle can be harder to manage, and some people find fasting more difficult in the days before their period. Tracking your cycle alongside headaches helps, and it is reasonable to eat regular meals during higher-risk days.

Do I need to change how I take migraine medication while fasting?

It depends on the medication. Some need to be taken with food, while others, such as injected preventive treatments, do not depend on meals. Ask your prescriber or pharmacist before changing your eating schedule. See fasting and medications.

Can fasting cause aura without a headache?

Migraine aura can occur with or without a headache. If you notice aura during a fast, it is sensible to eat and drink. Any new, unusual, or prolonged neurological symptom, such as vision loss, numbness, weakness, or difficulty speaking, needs prompt medical evaluation, because these can also be signs of other conditions.

The Bottom Line

Going too long without food is a common migraine trigger, so intermittent fasting carries a real risk of more attacks for people with migraine, especially in the first weeks. Research on ketogenic diets has produced some promising early results, but intermittent fasting has not been shown to prevent migraines and is not a treatment. If you want to try fasting, talk to your healthcare provider first, start with a short overnight fast, keep fluids, caffeine, and sleep consistent, and stop if your headaches get worse.

Related Reading