How to Get Rid of a Migraine: Fast Relief and Prevention

When a migraine hits, the fastest relief comes from taking the right medication early, retreating to a dark and quiet room, and applying cold to your head or neck. But getting rid of migraines long-term requires a layered approach: identifying your triggers, building consistent habits, and in many cases, starting a preventive treatment. Here’s what actually works, from immediate relief to long-term reduction.

Stop a Migraine in Progress

The single most important rule for acute migraine treatment is to act fast. Taking medication within the first 30 to 60 minutes of symptoms, before pain fully sets in, dramatically improves your odds of stopping the attack. Waiting until the pain peaks makes every treatment less effective.

Triptans remain the gold standard for stopping a migraine once it starts. Oral sumatriptan, the most widely prescribed, comes in 25, 50, or 100 mg tablets, with a maximum of 200 mg in a 24-hour period. These drugs work by narrowing blood vessels and blocking pain signals in the brain. They’re highly effective for most people but aren’t suitable if you have uncontrolled blood pressure, prior stroke, or heart disease because of their effect on blood vessels.

A newer class of medications called gepants (including ubrogepant and rimegepant) works differently. Instead of constricting blood vessels, they block a protein called CGRP that triggers migraine pain signals. This makes them a good option if you can’t take triptans for cardiovascular reasons, or if triptans haven’t worked well for you. Gepants can be used both to treat an active migraine and, in some cases, to prevent them.

Over-the-counter options like ibuprofen, naproxen, and aspirin can work for mild to moderate migraines, especially when taken early. Combining a pain reliever with caffeine (or using a product that already contains caffeine) can boost absorption and effectiveness. However, there’s a critical limit: using any acute headache medication on 10 or more days per month for three or more months can cause medication overuse headache, a rebound cycle where the treatments themselves start generating more headaches. If you find yourself reaching for painkillers that often, it’s a sign you need preventive treatment instead.

Immediate Relief Without Medication

While you wait for medication to kick in, or if you prefer non-drug approaches, several strategies can take the edge off. Apply a cold pack or frozen gel wrap to your forehead, temples, or the back of your neck for 15 to 20 minutes. Cold constricts blood vessels and numbs the area, which many people find more effective than heat during a migraine.

Get into a dark, quiet room as quickly as possible. Light sensitivity during a migraine isn’t just discomfort. Research from Harvard Medical School found that at typical office-level brightness, nearly 80 percent of migraine sufferers experience worsened pain from exposure to light. Interestingly, narrow-band green light is the one exception: at low intensities, it actually reduced migraine pain by about 20 percent in the same study. If you can’t get to a dark room, green-tinted glasses designed to filter other wavelengths may help.

Staying hydrated matters more than most people realize. Dehydration is a well-established migraine trigger, and drinking water or an electrolyte drink during an attack won’t cure it but can keep things from getting worse. Some people also find relief from strong ginger tea or ginger supplements, which have modest evidence for reducing migraine nausea.

Identify and Manage Your Triggers

Migraines are rarely caused by a single trigger. They tend to stack: poor sleep plus skipping a meal plus stress plus a glass of wine might push you over the threshold on a given day, while any one of those alone wouldn’t. The most commonly reported dietary triggers are alcohol (reported by 33 percent of migraine sufferers) and chocolate (22 percent). Other frequent culprits include aged cheeses, processed meats containing sulfites (like bacon, sausage, and salami), aspartame, and caffeine, both too much and sudden withdrawal.

Keeping a headache diary for at least six to eight weeks is the most reliable way to spot your personal patterns. Track what you ate, how you slept, your stress level, weather changes, hormonal timing, and when the migraine started. Over time, patterns emerge that are easy to miss day to day. The goal isn’t to eliminate every possible trigger food forever. It’s to identify the two or three factors that most reliably contribute to your attacks and manage those specifically.

Supplements That Reduce Migraine Frequency

Three supplements have enough evidence behind them that headache specialists routinely recommend them for migraine prevention. They’re not quick fixes. Expect to take them daily for two to three months before seeing the full benefit.

  • Magnesium oxide: 400 to 500 mg per day, as recommended by the American Headache Society. Low magnesium levels are common in people with migraines, and supplementation can reduce attack frequency. Start with a lower dose and increase gradually, as magnesium can cause loose stools.
  • Riboflavin (vitamin B2): 400 mg per day. This is well above the normal dietary amount, but it supports energy production in brain cells and has been shown to reduce migraine days.
  • CoQ10: 300 mg per day has been found to reduce migraine frequency in adults. It works through a similar energy-metabolism pathway as riboflavin.

These supplements can be taken alongside prescription medications. They tend to have minimal side effects, which is why many neurologists suggest trying them first, especially for people with fewer than four migraines a month.

Prescription Prevention for Frequent Migraines

If you’re having four or more migraine days per month, preventive medication can significantly cut that number. The newest and most targeted option is a class of injectable medications that block CGRP, the same pain-signaling protein targeted by gepants. Four are currently available: erenumab, fremanezumab, galcanezumab, and eptinezumab. Three of them are self-administered injections you give yourself at home once a month. Fremanezumab also offers a quarterly dosing option of just four injections per year. Eptinezumab is given as an IV infusion every three months at a clinic.

These CGRP-blocking injections were designed specifically for migraine, which sets them apart from older preventive medications (like certain blood pressure drugs or antidepressants) that were originally developed for other conditions and happened to help with migraines as a side effect. The targeted approach generally means fewer side effects, though the medications are more expensive and may require prior authorization from insurance.

Older preventive options, including certain beta-blockers, antiseizure medications, and antidepressants, still work well for many people and are typically much cheaper. Your doctor will weigh frequency, severity, other health conditions, and cost when recommending a starting point.

Biofeedback and Behavioral Approaches

Biofeedback trains you to control physical stress responses, like muscle tension and blood flow, using real-time sensors that display your body’s signals on a screen. It sounds abstract, but the results are concrete: biofeedback combined with relaxation training produces a 45 to 60 percent reduction in headache frequency and severity, according to the American Migraine Foundation. That’s comparable to many prescription preventive medications.

A typical course involves 8 to 12 sessions with a trained therapist, after which you practice the techniques on your own. Cognitive behavioral therapy focused on pain management can also help, particularly for people whose migraines are closely tied to stress or anxiety cycles. These approaches work best as part of a broader prevention plan rather than a standalone treatment.

Wearable Neuromodulation Devices

FDA-cleared devices that deliver mild electrical or magnetic stimulation offer another drug-free option. Nerivio, a wearable arm device, uses remote electrical stimulation and is used for both acute treatment and prevention, with preventive protocols involving 45-minute sessions every other day. Cefaly, worn on the forehead, stimulates the nerve most associated with migraine pain and is used in a daily session for prevention or on-demand for acute attacks.

These devices don’t work for everyone, but they carry very few risks and can be useful additions for people who want to reduce their medication use or who haven’t responded well to drugs alone.

Headaches That Need Emergency Attention

Most migraines, while miserable, are not dangerous. But certain features signal something more serious. A headache that reaches maximum intensity within seconds, often called a thunderclap headache, can indicate a vascular emergency like a brain aneurysm and needs immediate evaluation. New neurological symptoms that aren’t part of your usual migraine pattern, such as sudden weakness in an arm or leg, new numbness, or vision changes, are also red flags.

Other warning signs include a first-ever severe headache after age 50, headaches that are clearly and steadily worsening over weeks, and headaches accompanied by fever, night sweats, or unexplained weight loss. Headache specialists use these criteria to distinguish primary headaches like migraine from secondary headaches caused by an underlying condition. If any of these apply to you, get evaluated promptly rather than assuming it’s just another migraine.