How to Get Rid of a Migraine: Home Remedies and Rx

The fastest way to get rid of a migraine is to take a pain reliever early, retreat to a dark and quiet room, and apply cold to your head or neck. Timing matters more than almost anything else: treating within the first 20 to 30 minutes of symptoms, before pain intensifies, dramatically improves your chances of stopping an attack. Beyond that initial response, you have a range of options depending on how often you get migraines and how severe they are.

Start With Over-the-Counter Pain Relievers

For mild to moderate migraines, ibuprofen is the most effective widely available option. At 400 mg, roughly 60 to 72% of people experience meaningful pain relief within two hours, and about 25 to 40% become completely pain-free. That’s a significant edge over doing nothing, where only about 13 to 28% of people see the same improvement. Take it as early as possible, ideally with a glass of water and a small amount of food to protect your stomach.

Naproxen sodium works too, but it’s somewhat less effective. A typical dose of 500 mg provides partial relief in about one out of every seven people who try it, compared to ibuprofen’s roughly one in three. The tradeoff is that naproxen lasts longer in your system, which can help if your migraines tend to drag on for hours. An 825 mg starting dose may work slightly better than the standard 500 mg.

Acetaminophen is another option, though it’s generally weaker for migraines than anti-inflammatory drugs. Combination products that pair a pain reliever with caffeine can boost absorption and effectiveness, since caffeine constricts blood vessels and enhances how quickly the medication reaches your bloodstream.

Reduce Sensory Input Immediately

Your brain becomes hypersensitive during a migraine. Light, sound, and even certain smells can intensify pain because the nerve pathways that process sensory information, particularly the optic nerve, become overactive during an attack. This is why retreating to a dark, quiet room for 20 to 30 minutes genuinely helps and isn’t just about comfort.

If you can’t get to a dark room, wear sunglasses or close your eyes. Noise-canceling headphones or earplugs can substitute for a quiet space. The goal is to strip away as much stimulation as possible so your nervous system can calm down.

Use Cold or Heat on Your Head and Neck

A cold pack on your forehead, temples, or the back of your neck can dull migraine pain within minutes. Cold constricts blood vessels and reduces nerve signaling in the area. Wrap ice or a cold gel pack in a thin cloth and apply for 15 to 20 minutes at a time. Some people find alternating cold on the head with warmth on the neck or shoulders more effective, since heat relaxes the tight muscles that often accompany a migraine.

Prescription Options for Moderate to Severe Attacks

If over-the-counter medications don’t cut it, triptans are the most widely prescribed class of migraine-specific drugs. They work by narrowing blood vessels around the brain and blocking pain signals in the nerve pathways that drive migraines. Triptans come in tablets, nasal sprays, and injections. The injectable form works fastest, often within 10 to 15 minutes, while tablets typically take 30 minutes to an hour.

A newer class of drugs called gepants takes a different approach. These block a protein called CGRP that plays a central role in triggering migraine pain and inflammation. In clinical trials, rimegepant provided complete pain relief at two hours in about 21% of patients (compared to 12.5% on placebo) and relieved the most bothersome symptom, whether that was nausea, light sensitivity, or sound sensitivity, in 36% of users. Gepants are a particularly good fit if you can’t tolerate triptans or have heart disease, since unlike triptans they don’t constrict blood vessels.

Try Caffeine Strategically

A small amount of caffeine, roughly the amount in a cup of coffee, can help stop a migraine on its own or boost the effect of a pain reliever you’ve already taken. Caffeine narrows dilated blood vessels and improves absorption of other medications. This is why it’s included in several over-the-counter migraine formulas. The catch: if you consume caffeine daily, skipping it can trigger a migraine, and using it too frequently for headaches contributes to rebound patterns. Keep caffeine as an occasional tool, not a daily rescue strategy.

Ginger as a Supplement

Ginger has surprisingly strong evidence behind it. In one clinical trial, 250 mg of powdered ginger matched 50 mg of sumatriptan (a leading triptan) for pain reduction at the two-hour mark, with both groups showing nearly identical improvement scores. Ginger also helps with the nausea that accompanies many migraines. You can take it as a capsule, brew fresh ginger tea, or even chew on candied ginger at the first sign of an attack. It’s inexpensive, widely available, and has minimal side effects.

Magnesium for Acute and Preventive Use

Low magnesium levels are common in people who get frequent migraines, and supplementing can help both during an attack and as ongoing prevention. For acute relief, 400 to 600 mg of magnesium oxide in pill form can be taken at the onset of symptoms. For prevention, the same daily dose of 400 to 600 mg, taken consistently, reduces the frequency and severity of attacks over time. Magnesium oxide is the most studied form for migraines specifically. The main side effect is loose stools, which you can minimize by splitting the dose across the day.

Neuromodulation Devices

Several FDA-cleared devices now offer drug-free migraine treatment. Nerivio, for example, is a small device worn on the upper arm that delivers mild electrical stimulation controlled through a smartphone app. It works by activating your body’s own pain-dampening systems: the electrical signal travels to the brainstem and triggers a natural analgesic response that competes with and reduces migraine pain. You apply it at the start of an attack for about 45 minutes. Another device, Cefaly, stimulates the nerve above the eyebrows that’s involved in many migraines. These devices are worth considering if you get frequent migraines and want to reduce how much medication you take.

Watch for Medication Overuse

One of the most common reasons migraines become more frequent is, paradoxically, taking too much migraine medication. Your brain adapts to frequent pain relief by lowering its pain threshold, creating a cycle where the medication itself starts causing headaches. The limits are specific: keep simple painkillers like ibuprofen or acetaminophen to fewer than 15 days per month, and triptans, gepants, or combination pain relievers to no more than 9 days per month. If you’re reaching for a pain reliever more than two or three times a week, that’s a signal to talk to a doctor about preventive treatment instead.

When a Headache Isn’t Just a Migraine

Most migraines, while miserable, are not dangerous. But certain features signal something more serious. A headache that hits maximum intensity within seconds, often described as a “thunderclap,” is one of the most concerning and warrants immediate emergency evaluation. Other red flags include headache with fever or unexplained weight loss, new weakness or numbness on one side of your body, visual changes that are different from your usual aura, headaches that steadily worsen over weeks, pain that changes with body position (worse when standing or lying down), and a first-ever severe headache during or after pregnancy. A typical migraine fluctuates and follows a familiar pattern you recognize. A headache that behaves differently from your usual pattern, especially with any of these features, needs medical attention.