Why Do I Get Headaches Before My Period?

Woman resting her hand on her forehead in soft afternoon sunlight

By Kirstie Vesseur, Registered Clinical Nutritionist (CNA), Legacy Nutrition, NZ and Australia.

You can almost set your calendar by it. A day or two before your period, the dull ache starts behind your eyes, or a full migraine takes you out of action, and you know it will be back next month.

If you have typed "why do I get headaches before my period" into a search bar, you are far from alone. Migraine affects about 1 in 7 New Zealanders, more women than men, and roughly 20 to 25% of women with migraine have attacks clearly linked to their cycle. These headaches follow a predictable hormonal pattern, which means you can often plan ahead rather than just react.

What causes headaches before your period?

The oestrogen drop

The best understood trigger is the fall in oestrogen in the last few days of your cycle. Oestrogen influences pain pathways in the brain, and when it drops, some women become much more prone to migraine. Menstrual migraine is defined as attacks that start between two days before and three days after your period begins. Some women notice the same pattern in the pill-free week of the combined pill, for the same reason.

Attacks around your period also tend to be more disabling than attacks at other times of the month, so they are worth taking seriously.

Prostaglandins

Prostaglandins are the inflammatory messengers that make your uterus contract and cause period cramps. They are released around menstruation and are also thought to contribute to menstrual migraine, which may help explain why period pain and period headaches often turn up together.

Low magnesium

Magnesium helps calm nerve signalling and is one of the most studied nutrients in migraine. In a small study, menstrual migraine pain fell as magnesium levels inside cells rose, and intake can easily be low if your diet is light on nuts, seeds, legumes and leafy greens.

Skipped meals, short sleep and stress

In a study of more than 1,200 people with migraine, of those who could name a trigger, the most common were stress (80%), hormonal changes in women (65%), not eating (57%) and disturbed sleep (50%). Before your period, these often stack up at once.

Iron

Heavy periods drain iron month after month. In a large US population study, women aged 20 to 50 with the highest dietary iron intake had lower odds of severe headache or migraine than those with the lowest intake. This shows a link, not cause and effect, but low iron is common and worth ruling out. My post on why your ferritin might be low explains what to check.

When to see your GP

Call 111 (NZ), 000 (Australia) or your local emergency number now if you have:

  • A sudden, severe headache that feels like the worst of your life
  • Headache with weakness, numbness, slurred speech, confusion or loss of vision
  • Headache with fever and a stiff neck or rash, or after a head injury
  • A severe headache in pregnancy or after giving birth, especially with swelling or vision changes

See your GP within a day or two if you have: a first severe headache after age 50, a clear change in your usual pattern, new aura, or headaches that wake you. In NZ you can also call Healthline on 0800 611 116. If you use pain relief on more than 10 days a month, talk to your GP, as frequent use can itself cause headaches.

Combined hormonal contraception (the combined pill, patch or ring) should not be used if you get migraine with aura (visual changes or tingling before the headache), because it increases the risk of stroke. If you notice aura for the first time while on the combined pill, contact your GP or family planning clinic within days so they can move you to a safer method. Otherwise, do not stop or change prescribed medication without talking to your GP. They can also discuss medicines timed around your period.

What is worth checking

  • A headache diary for three cycles. Note cycle day, severity, sleep, meals, alcohol and stress in the 24 to 48 hours before each headache. This is how menstrual migraine is diagnosed.
  • Ferritin and a full blood count, especially if your periods are heavy.

A normal blood magnesium result does not rule out low intake, as blood holds only a small share of your body's magnesium.

How nutrition can help

1. Do not skip meals, especially premenstrually

Eat three regular meals with a whole hand of protein at each one, plus vegetables and a slow carbohydrate such as kūmara, oats or brown rice. Do not skip breakfast in the week before your period.

2. Build in magnesium-rich foods every day

  • 2 tablespoons (about 20 g) of pumpkin seeds
  • A small handful (30 g) of almonds or cashews
  • 1 cup of cooked spinach or silverbeet
  • ½ cup of cooked black beans, chickpeas or lentils
  • 2 to 3 squares of dark chocolate (70% or more), if chocolate is not one of your triggers

3. Consider a magnesium supplement

In a small double-blind trial in women with menstrual migraine, magnesium taken from day 15 of the cycle until the next period reduced headache days and premenstrual symptoms compared with placebo. Healthify NZ also lists magnesium, riboflavin and coenzyme Q10 as supplements that may help prevent migraine.

How I would use it: 200 to 350 mg of elemental magnesium a day, as magnesium glycinate or citrate, taken in the evening. You can take it daily or from mid-cycle (around day 14) until your period arrives. Do not go above 350 mg a day from supplements unless your health professional recommends it. Loose stools are the first sign you are taking too much. In pregnancy, stay within 350 mg from supplements and tell your midwife or LMC. Avoid magnesium supplements if you have kidney disease, and ask your pharmacist how far apart to take them from other medicines, as magnesium can reduce the absorption of some, including certain antibiotics, thyroid medication and osteoporosis medicines (usually at least 2 hours apart).

4. Ask about riboflavin (vitamin B2)

In a small 3 month randomised trial of 55 people, 400 mg of riboflavin a day at least halved migraine days in 59% of people, compared with 15% on placebo. It was not tested specifically in menstrual migraine, but it is low cost and well tolerated. It takes about 3 months to judge and turns your urine bright yellow, which is harmless. It has not been tested in pregnancy or breastfeeding, so do not take high doses then unless your midwife, LMC or doctor advises it. Food sources include eggs, milk, yoghurt, almonds, mushrooms and lean meat.

5. Eat oily fish two to three times a week

In a 16 week randomised trial of 182 adults with frequent migraine, a diet higher in omega-3 fats from oily fish reduced headache hours and headache days, with the best results when seed and vegetable oils high in linoleic acid were also reduced. Practically, that looks like:

  • Salmon, sardines, kahawai or Atlantic mackerel, 2 to 3 times a week (a serve is about 100 to 150 g)
  • Extra virgin olive oil, macadamia or avocado oil for cooking instead of sunflower, soybean or corn oil
  • Fewer fried and packaged foods, which are the main sources of those oils
  • If pregnant or breastfeeding, choose low-mercury fish and avoid shark (lemon fish), swordfish, marlin and king mackerel

6. Manage your known triggers

  • Caffeine: keep it steady and no more than 2 cups of coffee a day. Sudden withdrawal can trigger a headache.
  • Alcohol: red wine is a common culprit. Cut back in the five days before your period.
  • Sleep: keep regular bed and wake times, and avoid long sleep-ins.
  • Fluids: sip water through the day, more in hot weather or if you exercise.

Use your diary to find your own pattern. If your headaches come with low mood, anxiety or rage before your period, my post on PMDD nutrition and supplements is worth a read.

Where to start

You do not have to lose days every month to headaches. Start a diary this cycle, stop skipping meals in the week before your period, add the magnesium foods above and check your iron. Give changes three cycles to judge, because the trigger is cyclical. If you take any medication, are pregnant or breastfeeding, check with your GP or pharmacist before starting a supplement.

Find the right plan for your cycle
Not sure where to start? Take the 60 second quiz in the Legacy Shop and it will point you to the blueprint that fits your symptoms, with meals, supplements and daily steps in one practical guide. For magnesium-rich, blood sugar friendly recipes, explore Legacy's Kitchen.
Visit the Legacy Shop
Want help with your own plan? Book your free 30 minute assessment

References

  1. Vetvik KG, MacGregor EA. Menstrual migraine: a distinct disorder needing greater recognition. Lancet Neurol. 2021. https://pubmed.ncbi.nlm.nih.gov/33600767/

  2. Facchinetti F, et al. Magnesium prophylaxis of menstrual migraine: effects on intracellular magnesium. Headache. 1991. https://pubmed.ncbi.nlm.nih.gov/1860787/

  3. Schoenen J, et al. Effectiveness of high-dose riboflavin in migraine prophylaxis: a randomized controlled trial. Neurology. 1998. https://pubmed.ncbi.nlm.nih.gov/9484373/

  4. Ramsden CE, et al. Dietary alteration of n-3 and n-6 fatty acids for headache reduction in adults with migraine: randomized controlled trial. BMJ. 2021. https://pubmed.ncbi.nlm.nih.gov/34526307/

  5. Kelman L. The triggers or precipitants of the acute migraine attack. Cephalalgia. 2007. https://pubmed.ncbi.nlm.nih.gov/17403039/

  6. Meng SH, et al. Association between dietary iron intake and serum ferritin and severe headache or migraine. Front Nutr. 2021. https://pmc.ncbi.nlm.nih.gov/articles/PMC8289886/

  7. Bateson D, McNamee K, Lathlean E. Contraception choice dilemma: a woman with migraine with aura. Medicine Today. 2021. https://medicinetoday.com.au/2021/november/regular-series/contraception-choice-dilemma-woman-migraine-aura

  8. Healthify He Puna Waiora. Migraine disease, and Magnesium supplements. Accessed 2026. https://healthify.nz/health-a-z/m/migraine-severe-headache and https://healthify.nz/medicines-a-z/m/magnesium-supplements

This article is general education, not personal medical advice. Please talk with your GP before starting supplements or changing medication.

Next
Next

Why Do I Have Acne as an Adult?