How to Treat a Migraine Headache: Meds and Prevention

Treating a migraine depends on how often you get them and how severe they are. For occasional attacks, over-the-counter pain relievers taken early can be enough. For frequent or debilitating migraines, prescription medications, preventive therapies, and lifestyle strategies work together to reduce both the intensity and frequency of attacks. Here’s what actually works and how to use each option effectively.

Stop an Attack Early With the Right Timing

The single biggest factor in treating an active migraine is how quickly you act. Pain relievers work dramatically better when taken at the first sign of an attack, before pain fully develops. Once a migraine is well established, the gut slows down and absorbs medication poorly, making the same pill far less effective.

For mild to moderate attacks, standard anti-inflammatory drugs like ibuprofen, naproxen, or aspirin are the usual first step. Combining an anti-inflammatory with caffeine (or choosing an over-the-counter product that includes both) can improve results. If those aren’t enough, prescription options are the next level.

Prescription Options for Acute Attacks

Triptans remain the most effective class of prescription migraine medication. They’re generally more effective than over-the-counter pain relievers and also outperform many newer FDA-approved alternatives. Seven different triptans are available in various forms including pills, nasal sprays, and injections, so if one doesn’t work well for you, another might. They work by narrowing blood vessels and blocking pain pathways in the brain. Doctors typically prescribe them when anti-inflammatories aren’t cutting it or when attacks are severe from the start.

Two newer drug classes offer alternatives for people who can’t take triptans (often due to heart disease risk or side effects). Gepants block a protein called CGRP that plays a central role in migraine pain. They come as pills or nasal sprays and don’t carry the cardiovascular restrictions that triptans do. Ditans target serotonin receptors differently than triptans and also avoid cardiovascular concerns, though they can cause dizziness and drowsiness significant enough that you shouldn’t drive for eight hours after taking one.

Watch Out for Medication Overuse

This is the trap many migraine sufferers fall into without realizing it. Using acute migraine medication too frequently can actually cause more headaches, a condition called medication overuse headache. The threshold varies by drug class: for triptans and combination painkillers, the cutoff is 10 or more days per month. For simple anti-inflammatories, it’s 15 or more days per month. If you’re reaching for migraine medication that often for more than three months, the medication itself may be perpetuating a cycle of daily or near-daily headaches. Breaking the cycle usually means tapering off the overused medication while starting a preventive therapy.

When to Start Preventive Treatment

The American Headache Society recommends considering preventive treatment if you have four or more headache days per month. Prevention is especially worth pursuing if your attacks are long-lasting, severely disabling, or not responding well to acute treatments. The goal isn’t to eliminate every migraine but to cut the frequency roughly in half while making the remaining attacks milder and shorter.

CGRP-Targeting Preventives

The biggest advance in migraine prevention over the past decade is a class of drugs that block CGRP, the same pain-signaling protein targeted by gepants. Four injectable antibodies are available. Three of them are self-administered monthly injections you give yourself at home with a simple pen device. One of those three also offers a quarterly dosing option (four injections per year). The fourth is given as an IV infusion at a clinic every three months.

For people who prefer not to inject, oral and nasal preventive options also target this pathway. One is a daily pill, another dissolves under the tongue, and a nasal spray version is also available. These CGRP-targeting preventives were designed specifically for migraine, which means they tend to have fewer unrelated side effects compared to older preventive medications that were originally developed for blood pressure, seizures, or depression.

Botox for Chronic Migraine

If you have 15 or more headache days per month (classified as chronic migraine), botulinum toxin injections are an FDA-approved preventive option. The procedure takes about 15 minutes and involves 31 small injections across seven muscle areas of the head and neck, covering the forehead, temples, back of the head, neck, and upper shoulders. Treatments are repeated every 12 weeks. Most people need two to three rounds before seeing the full benefit, so it requires some patience.

Older Preventive Medications

Before CGRP drugs existed, doctors used medications borrowed from other fields: beta-blockers (originally for blood pressure), certain antidepressants, and anti-seizure medications. These remain effective options for many people and are often less expensive. The trade-off is that their side effects, like fatigue, weight changes, or cognitive fogginess, can be more noticeable since these drugs affect systems beyond migraine pathways.

Supplements That Reduce Migraine Frequency

Three supplements have enough clinical evidence to be worth trying, particularly if you prefer starting with something lower-risk before moving to prescription preventives.

  • Magnesium oxide: 400 to 500 milligrams daily, as recommended by the American Headache Society. Magnesium is involved in nerve signaling, and many migraine sufferers have lower levels. It can cause loose stools at higher doses, so starting at the lower end and increasing gradually helps.
  • Riboflavin (vitamin B2): 400 milligrams daily. This is far above the amount in a multivitamin. Riboflavin supports energy production in brain cells, and it can take two to three months of consistent use before you notice a difference.
  • CoQ10: 300 milligrams daily has been shown to reduce migraine frequency in adults. Like riboflavin, it supports cellular energy metabolism and takes several weeks to show results.

These supplements work best as part of a broader prevention strategy rather than standalone treatments. They’re generally safe to combine with prescription preventives.

Neuromodulation Devices

Several FDA-cleared devices offer drug-free treatment by stimulating nerves involved in migraine processing. They can be used for both acute attacks and daily prevention, and some people use them alongside medications to reduce how much medication they need.

One popular option is a forehead-worn device that attaches magnetically to an adhesive electrode on the skin. It sends gentle electrical signals through branches of the trigeminal nerve, a key nerve in migraine pain. The acute program runs for one to two hours during an attack, while the preventive program is a 20-minute daily session. An arm-worn device controlled by a smartphone app uses a different approach, stimulating nerves in the upper arm for 45 minutes per session. For acute use, you activate it at migraine onset. For prevention, you use it every other day.

A handheld vagus nerve stimulator is placed against the neck and delivers two-minute stimulations. A magnetic pulse device held at the back of the head delivers brief magnetic pulses to interrupt migraine activity in the brain. All of these devices are prescription items, but they carry essentially no systemic side effects since they don’t involve medication entering your bloodstream.

Lifestyle Factors That Matter

Consistency is the common thread in lifestyle-based migraine management. Irregular sleep, skipped meals, and dehydration are among the most reliable migraine triggers. Going to bed and waking up at the same time every day, even on weekends, helps stabilize the brain’s sensitivity threshold. Eating at regular intervals prevents blood sugar drops that can initiate an attack.

Regular aerobic exercise, around 30 to 40 minutes three to five times per week, has been shown to reduce migraine frequency comparably to some preventive medications. The mechanism likely involves the body’s natural pain-modulating systems that ramp up with sustained cardiovascular activity. Start gradually if exercise itself tends to trigger your attacks, and stay well-hydrated during workouts.

Stress management matters too, though not in the way most people assume. Migraines often hit not during peak stress but during the “letdown” period afterward, like a weekend after a demanding work week. Techniques that keep stress levels more even, such as regular mindfulness practice, progressive muscle relaxation, or cognitive behavioral therapy, can reduce this roller-coaster effect.

Headache Red Flags That Need Immediate Attention

Most migraines, while miserable, aren’t dangerous. But certain features signal that a headache could be something more serious. Seek emergency evaluation for any of these:

  • Thunderclap onset: A headache that reaches maximum intensity within seconds. This is one of the most concerning signs and can point to a vascular emergency like a ruptured aneurysm.
  • New neurological symptoms: Weakness in an arm or leg, numbness that’s new or different from your usual aura, speech difficulty, or unusual vision changes.
  • Fever, night sweats, or weight loss accompanying a headache pattern, which may suggest an underlying systemic illness.
  • New headaches after age 50: Most primary headache disorders start earlier in life. A new pattern after 50 is more likely to have a secondary cause.
  • Steady worsening: A headache that progressively becomes more severe or more frequent over weeks, rather than following the typical migraine pattern of distinct attacks.
  • Positional changes: Pain that dramatically shifts when you stand up, lie down, cough, or strain, which can indicate a pressure problem inside the skull.
  • New headache during or after pregnancy: This warrants evaluation for vascular or hormonal complications specific to pregnancy.