What you can do in the first few minutes

The fastest way to stop a migraine is to take pain medication as soon as you feel it beginning—ideally within the first 15 to 30 minutes. This matters because migraine medication works better before the pain becomes severe. Over-the-counter options like ibuprofen (Advil, Motrin) or naproxen (Aleve) work for some people, while others need prescription medications called triptans (sumatriptan, rizatriptan, and others), which are designed specifically for migraine and work by narrowing blood vessels and blocking pain signals in the brain.

Beyond medication, move to a quiet, dark room if you can. Light and sound make migraines worse for most people, so dimming the lights or turning them off entirely, closing curtains, and reducing noise can bring relief within minutes. If you are at work or somewhere you cannot leave, even closing your eyes and covering them with your hands helps.

Apply a cold or warm compress to your head or neck—whichever feels better to you. Some people find ice packs on the forehead or back of the neck soothing; others prefer a heating pad on the shoulders or neck. There is no single right answer; use what your body responds to.

Key Takeaways

  • Taking pain medication within the first 15 to 30 minutes of migraine onset works better than waiting, because the medication is more effective before pain becomes severe.
  • Moving to a dark, quiet room and applying a cold or warm compress can reduce pain within minutes without medication.
  • Staying hydrated and avoiding caffeine withdrawal are important because dehydration and caffeine changes can trigger or worsen migraines.
  • If over-the-counter medication does not work after two or three migraines, talk to your doctor about prescription options like triptans.
  • Keeping a migraine diary—noting when they start, what you were doing, and what stopped them—helps you and your doctor find patterns and prevent future ones.

Medication options and how they work

Over-the-counter pain relievers like ibuprofen and naproxen reduce inflammation and block pain signals. They typically take 30 to 60 minutes to work and are most effective if you take them early. Acetaminophen (Tylenol) is an option for some people, though it is generally considered less effective for migraine than ibuprofen or naproxen.

If over-the-counter medication does not stop your migraines, your doctor may prescribe a triptan. Triptans work differently than regular pain relievers—they narrow blood vessels around the brain and block pain pathways. Common triptans include sumatriptan (Imitrex), which comes as a pill, nasal spray, or injection; rizatriptan (Maxalt); and zolmitriptan (Zomig). Triptans usually work within 30 to 60 minutes and are effective for about 70 percent of people who take them. Your doctor will help you find which one works best for you.

Some people benefit from combination medications that pair a pain reliever with caffeine or other ingredients. Your doctor can discuss whether this approach might help in your situation.

Hydration and other immediate steps

Dehydration is a common migraine trigger and can also make an active migraine worse. Drinking water or an electrolyte drink (like coconut water or a sports drink) in the first few minutes can sometimes reduce pain. Sip slowly rather than drinking a large amount at once, which can upset your stomach.

Avoid caffeine during a migraine if you do not normally use it, because caffeine can sometimes worsen pain. However, if you regularly drink caffeine and suddenly stop, that withdrawal itself can trigger or intensify a migraine—so if you normally have coffee, continuing your usual amount may help. The key is consistency: sudden changes in caffeine intake, either up or down, are more problematic than steady use.

If nausea accompanies your migraine, eating something light like crackers or toast may help, or it may make things worse—again, this varies by person. Do not force yourself to eat if the thought of food makes the nausea worse.

When to rest versus when to stay active

Most people feel better resting in a dark room during a migraine, and this is a reasonable first step. However, some people find that gentle movement—a short walk, light stretching, or slow breathing exercises—actually reduces pain. The difference often depends on whether your migraine includes dizziness or balance problems; if it does, rest is usually better.

If you have time, lying down with your head elevated on a pillow can ease pressure. Some people also find that relaxation techniques like slow, deep breathing or progressive muscle relaxation (tensing and releasing each muscle group) help calm the nervous system and reduce pain.

Do not push yourself to work or drive during a migraine, especially if your vision is affected or you feel dizzy. A migraine that impairs your ability to concentrate or see clearly is a sign to stop and rest, not to push through.

Knowing when to seek medical care

Most migraines can be managed at home, but certain warning signs mean you should contact a doctor or go to an emergency room. Seek immediate care if a migraine is accompanied by sudden severe weakness, numbness, vision loss in both eyes, difficulty speaking, confusion, or a stiff neck. These can signal something other than a typical migraine.

Also contact your doctor if your migraine pattern changes—for example, if they become more frequent, more severe, or different in character than your usual migraines. If your usual medication stops working, or if you are taking pain medication more than two or three times a week, talk to your doctor about prevention strategies, because frequent medication use can actually trigger more migraines over time.

If you have never had a migraine before and experience a severe headache with the symptoms described above, do not assume it is a migraine—get it checked by a doctor to rule out other causes.

Tracking what works for you

Keep a simple migraine diary for a few weeks. Note the date and time each migraine starts, what you were doing when it began, what you took to treat it, how long it lasted, and whether the treatment worked. Over time, patterns often emerge: certain foods, stress levels, sleep changes, or hormonal cycles may trigger your migraines, and you will learn which treatments work fastest for you.

Share this diary with your doctor at your next visit. It gives them concrete information about your migraines and helps them recommend the best prevention or treatment strategy. If you find that a particular medication works well, your doctor may suggest keeping it with you at all times so you can take it as soon as a migraine starts.

Preventing future migraines

While this article focuses on stopping a migraine once it has started, prevention is equally important. Common triggers include stress, skipped meals, too little sleep, hormonal changes, certain foods (chocolate, aged cheeses, processed meats, and foods with MSG are frequent culprits for some people), and sudden weather changes. Keeping your diary helps identify your personal triggers.

If you have more than four migraines a month, your doctor may recommend preventive medication—drugs taken daily to reduce how often migraines occur or how severe they are. These are different from the medications you take during a migraine and work by stabilizing brain chemistry over time. Examples include beta-blockers, certain antidepressants, and anti-seizure medications.

Frequently Asked Questions

How long does it usually take for migraine medication to work?

Over-the-counter pain relievers typically take 30 to 60 minutes. Prescription triptans usually work within 30 to 60 minutes as well, though some formulations (like nasal sprays or injections) work faster than pills. Taking medication within the first 15 to 30 minutes of migraine onset increases the chance it will work.

Can I take migraine medication too often?

Yes. Taking pain medication or triptans more than two or three days a week can lead to medication overuse headache, where your body becomes dependent on the medication and migraines actually become more frequent. If you find yourself reaching for migraine medication often, talk to your doctor about prevention strategies instead.

What is the difference between a migraine and a regular headache?

Migraines are typically one-sided, throbbing, and moderate to severe, often accompanied by nausea, vomiting, or sensitivity to light and sound. Regular tension headaches are usually mild to moderate, pressing or tightening (not throbbing), and do not typically come with nausea or light sensitivity. If you are unsure, your doctor can help you identify what you are experiencing.

Is it safe to use triptans if I have heart problems?

Triptans narrow blood vessels, so they are not recommended for people with certain heart conditions. If you have heart disease, high blood pressure, or a history of stroke, tell your doctor before taking a triptan. Your doctor can determine whether a triptan is safe for you or suggest an alternative.

Can children take the same migraine medications as adults?

Some medications are safe for children, but dosing is different and depends on age and weight. Over-the-counter ibuprofen is often used for children's migraines, but prescription triptans are only approved for children above a certain age. Talk to your child's doctor about what is safe and appropriate for their age.