How to find your migraine triggers with an app: what to log, for how long, and how to read the results
To find your migraine triggers:
- Log every attack, plus a short daily check-in on good days too: sleep, stress, meals, alcohol and caffeine, cycle day and weather.
- Keep it up for at least two to three months.
- Compare the day or two before each attack with your ordinary days.
A factor counts as a likely trigger when it shows up before attacks clearly more often than it does the rest of the time. An app makes this practical: it’s fast to log during an attack, it can fill in weather, sleep and cycle data automatically, and it does the comparison for you.
That’s the method. The rest of this guide covers each step and the mistakes that make people blame the wrong thing.
This is general information, not medical advice. Treat it as a well-sourced starting point for a conversation with your doctor.
Why you can’t just guess
Most people with migraine have a list of suspected triggers in their head. Memory is a poor tool for this job:
- You remember attack days, not the identical days that passed without one. If you drink coffee every morning, coffee will “precede” every attack.
- Real days are rarely comparable. Researchers tried to find pairs of days similar enough in weather, stress and hormones to test one trigger fairly. For stress and hormones, such pairs came up only one or two days a month, and for weather about two days a year (Houle & Turner 2013). A companion paper advised against relying on “natural experiments” and recommended diaries analysed statistically instead (Turner et al. 2013).
- Triggers are personal. In a 90-day diary study of 326 patients (Peris 2017), the average person had about four factors linked to their attacks, and 85% of those personal profiles were unique.
A population list like our top 30 migraine triggers tells you where to look. Only your own data tells you what applies to you.
Step 1: Decide what to log (keep it short)
The best log is one you’ll still be keeping in month three. Start with these:
Every day (a 30-second check-in):
- Sleep: roughly how long, and how rested you felt
- Stress, 0–10
- Meals: anything skipped or very late
- Alcohol: what and how much
- Caffeine: roughly how much, and whether you skipped your usual
- Cycle day, if relevant
- Anything unusual: travel, a hard workout, a late night, a new medicine
For every attack:
- When it started, and when it ended
- Severity
- Early warning signs in the hours before: yawning, cravings, neck stiffness, tiredness, light sensitivity
- What you took, and whether it helped
The daily check-in on attack-free days is the part most people skip, and it’s the part that makes the analysis work. Without it you have nothing to compare against.
Step 2: Log the attack while it’s happening
Details logged hours later are fuzzy, and details logged the next day are guesses. Log the start time when the attack starts, even if that’s all you can manage. You can fill in the rest when you feel better. This is where an app beats paper: a widget or a single watch tap is realistic in the middle of an attack, while finding a pen and a notebook often isn’t.
Step 3: Let automatic data do some of the work
Some factors are hard to log by hand but easy for a phone to collect:
- Weather and barometric pressure. Most people can’t feel a 5 hPa drop, but a phone can record it. See barometric pressure headaches for why it matters.
- Sleep, from a watch or sleep tracker.
- Menstrual cycle, from a cycle-tracking app or Apple Health.
Automatic data also avoids recall bias: you didn’t decide afterwards that it was “probably the weather”.
Step 4: Track long enough
Plan on at least two to three months, and longer if attacks are infrequent:
- The Peris study used 90 days of diaries to build personal profiles.
- If you menstruate, you need at least two or three cycles to see a menstrual pattern.
- The American Migraine Foundation puts it simply: the longer you track, the more you get out of it.
The first few weeks feel pointless. Keep going; patterns usually need more attacks than you’d expect.
Step 5: Read the patterns properly
When you have enough data, look at the 24–48 hours before each attack and ask four questions.
1. Is it more common before attacks than on ordinary days? This is the key test.
Say you had wine before 4 of 10 attacks. That sounds damning. But if you have wine on 40% of all days anyway, it’s exactly what chance predicts. The question isn’t “how often did X come before an attack”, it’s “how much more often than usual”.
2. Is the timing consistent? Real triggers tend to have a typical lag:
- Most alcohol-triggered attacks start within about 10 hours.
- In one diary study, a drop in stress raised the odds of an attack over the next 6 to 18 hours (Lipton 2014). That’s the “weekend migraine”.
A factor that turns up at random times before attacks is less convincing.
3. Could it be an early symptom rather than a cause? The premonitory phase can start hours before the pain, with cravings, yawning, neck stiffness, tiredness and sensitivity to light or smells (Pavlovic 2014; Marmura 2018). Chocolate is the classic example: a 2020 review found no controlled study where chocolate caused more attacks than a placebo (Nowaczewska 2020). The craving is often the attack starting. If a “trigger” usually arrives together with your early warning signs, be suspicious.
4. Does it only matter in combination? Many triggers only push you over the threshold when several stack up: a short night, plus a skipped lunch, plus falling pressure on day 1 of your period. Look for combinations that keep recurring, not just single items.
Step 6: Test one thing at a time
A pattern in your log is a lead, not a verdict. Before you cut something out:
- Change one thing at a time, and give it several weeks. Change three things at once and you won’t know which one helped.
- Keep logging while you test. Otherwise you’ll judge the change on memory again.
- Don’t over-restrict. Cutting out a long list of foods is hard to sustain, and the evidence for most food triggers is weak. Regular meals, regular sleep and steady caffeine are usually better first moves than elimination diets.
- Some triggers can’t be avoided, like weather or your cycle. Knowing about them still helps: you can plan around high-risk days, and your doctor may suggest a treatment plan for predictable windows.
When to see a doctor
Tracking doesn’t replace medical care, and a good log makes appointments much more useful.
See a doctor if:
- your attacks are getting more frequent or more severe
- you have attacks more than once a week
- you regularly get migraine around your period
- migraine is hard to control (NHS)
Medication overuse: taking acute medication often can itself cause more headaches. ICHD-3 uses 10 or more days a month for triptans and combination painkillers, and 15 or more for simple painkillers (ICHD-3). If you’re near those numbers, raise it with your doctor.
Get urgent help for:
- a sudden, extremely painful headache
- trouble speaking
- weakness on one side
- loss of vision
- confusion
- a seizure
- an attack lasting more than 72 hours
Bring your log, or an exported report, to the appointment. Attack frequency, how many days a month you take medication, and a MIDAS score are the numbers most clinicians want.
How a migraine app helps (and what it can’t do)
You can do all of this on paper; our printable migraine diary is built for it. An app mainly helps in four ways:
- Logging during an attack from a widget or a watch, when writing isn’t realistic.
- Automatic data: weather and pressure, sleep and cycle data without typing.
- The comparison: counting how often each factor appears before attacks, which is tedious by hand.
- Reports: a summary you can show your doctor instead of scrolling through notes.
What it can’t do is prove cause and effect. Treat anything an app flags as a lead to test (Step 6) and discuss with your doctor.
For a side-by-side look at the options, see our comparison of migraine tracker apps. Choose the one you’ll actually open every day.
Disclosure: I built one of these apps, Migra, for iPhone. It’s designed around this method:
- You can start an attack with one tap on Apple Watch.
- It reads live barometric pressure from the phone’s sensor and can alert you when pressure changes.
- It can pull sleep and cycle data from Apple Health.
- From five logged attacks it shows which of your triggers come up most often.
- It generates a PDF report, including MIDAS and HIT-6 scores, for your doctor.
It’s one option, not the only one. More about who makes it is on the about page.
The short version
- Log every attack, and do a 30-second check-in on good days too.
- Let your phone collect weather, sleep and cycle data.
- Keep going for at least two to three months.
- Look for factors that show up more often before attacks than usual, with consistent timing, and that aren’t really early symptoms.
- Test one change at a time, and bring the log to your doctor.
Frequently asked
How long does it take to find your migraine triggers?
▾
Plan on at least two to three months of daily logging, ideally covering several attacks and, if you menstruate, at least two or three cycles. A research study that built personal trigger profiles used 90 days of diaries. Less than a month usually isn't enough to separate real patterns from coincidence.
What should I log to find my migraine triggers?
▾
Log every attack (start time, severity, early symptoms, medication) plus a short daily check-in on non-attack days too: sleep, stress, meal times, alcohol and caffeine, cycle day and weather. Logging only on attack days makes everything look like a trigger, because you have nothing to compare against.
Can a migraine app find my triggers for me?
▾
An app can make logging fast, fill in data like barometric pressure, sleep and cycle automatically, and show which factors show up most often before your attacks. It can't prove cause and effect. Treat its patterns as leads to discuss with your doctor and test one at a time.
How do I know if something is a trigger or an early symptom?
▾
Look at timing. Many people have premonitory symptoms hours before the pain, such as food cravings, yawning, neck stiffness or sensitivity to light. If the 'trigger' tends to appear together with those signs, or only once you already feel off, it may be part of the attack rather than its cause.
When should I see a doctor about my migraine?
▾
See a doctor if attacks are getting more frequent or severe, happen more than once a week, or you're taking pain relief on many days a month. Get urgent help for a sudden, extremely painful headache, problems speaking, weakness on one side, vision loss, confusion or a seizure.
Sources
- Peris et al., 2017 — Determining potential trigger factors in individual patients (Cephalalgia, n=326)
- Houle & Turner, 2013 — Natural experimentation is a challenging method for identifying headache triggers (Headache)
- Turner et al., 2013 — Causality and headache triggers (Headache)
- Marmura, 2018 — Triggers, Protectors, and Predictors in Episodic Migraine (Curr Pain Headache Rep)
- Pavlovic et al., 2014 — Trigger factors and premonitory features of migraine attacks: summary of studies (Headache)
- Lipton et al., 2014 — Reduction in perceived stress as a migraine trigger (Neurology)
- Nowaczewska et al., 2020 — A review of the relationship between chocolate and migraines (Nutrients)
- ICHD-3 — 8.2 Medication-overuse headache
- American Migraine Foundation — Headache Journals: Tracking Your Migraine
- NHS — Migraine