Surgery may act as a trigger for people that experience migraine headaches or other primary headaches. Treatment includes medications and rest.

Headache is a common issue for people who undergo surgery. Several factors, such as stress, anesthesia, or type of surgery, may increase a person’s risk of developing migraine headaches or other headaches after surgery.

In this article, we discuss the causes of migraine headaches and other headaches following surgery. We also look at treatment and prevention options.

a person has had leg surgery and has a headacheShare on Pinterest
izusek/Getty Images

Headaches can occur after surgery for a variety of reasons.

According to a 2015 study, while anyone may experience a headache following a surgical procedure, people who regularly experience primary headaches, such as migraine headaches, are more likely to experience one post-op.

Post-op headaches or migraine headaches may have many causes, including:


One of the primary causes of post-op headaches could be a response to anesthesia. According to the American Society of Anesthesiologists, headaches following anesthesia are most common following a spinal block or epidural.

During one of these procedures, a needle may puncture the dura and cause cerebrospinal fluid to leak, which may then cause a headache to occur.

This type of headache is not due to migraine, but it can cause debilitating pain. For some people, it may only cause mild symptoms.

The headache and other symptoms, such as nausea, typically occur within 24–48 hours after the epidural but can occur at any time within 12 days. The symptoms may go away without treatment within 14 days.

Other causes

There are several potential causes of post-op headaches. And in some cases, a person or doctor may not know the exact cause.

For example, a 2015 study found that people who had outpatient surgery often experienced post-op headaches. The researchers noted that although many people had a history of primary headaches, they found only a few links between surgery-related procedures and those who experienced headaches.

Several factors could contribute to post-op headaches or trigger migraine headaches, such as:

  • anesthetic agents
  • pre-surgery fasting
  • pain
  • changes in sleep
  • being in the hospital and not in a familiar environment
  • caffeine withdrawal
  • changes to diet

When a person experiences a headache following surgery, there are several ways to manage the pain. Treatment can depend on whether the person is home or in the hospital.

For example, a person would need to ask a doctor for pain relief medication if they are still in the hospital.

Some common ways to treat mild to moderate headaches include:

  • using over-the-counter or prescription pain medications
  • resting
  • getting enough sleep
  • using cool compresses or ice packs
  • avoiding triggers

Researchers also suggest that hydration and caffeine either through drinks or IV may help with alleviating headache symptoms.

People who receive an epidural and develop a headache can follow similar self-care steps. However, if the pain is severe or does not go away, a doctor may recommend an epidural blood patch.

In this procedure, a doctor will attempt to fix a hole left from the needle of the epidural by injecting blood into the space. The procedure has an 85–90% effectiveness rate.

It may not be possible to prevent a headache following a surgical procedure.

During labor and delivery, people could consider avoiding an epidural. However, they should discuss the benefits and risks of the procedure with a doctor since only about 1% of all epidural placements result in a dural puncture, leading to a headache.

People that experience chronic migraine should talk with their doctor about their upcoming procedure. The doctor may offer some advice on how to prevent an episode. They should also let a doctor know if the surgery triggers a migraine headache.

People with chronic migraine or other primary headaches should ask a doctor whether to continue with their treatment plan or change strategies if an episode happens due to surgery.

Once home from the hospital, a person can take steps to stay hydrated and get enough rest. Taking these steps may help prevent a headache from occurring.

Typically, one can expect full recovery from a post-op headache. They may require some over-the-counter medications, rest, and other interventions to help them feel better sooner.

People with chronic migraine are more likely to experience an episode. They should speak with a doctor about possible prevention strategies and what they should do if the procedure triggers a migraine headache.

Following surgery, migraine headaches and other headaches may occur and likely occur more frequently in people that experience chronic migraine. For people with migraine, surgery or a stay in a hospital setting could act as triggers. Others may experience a headache due to a complication, such as during an epidural.

People with chronic migraine should talk to a doctor about steps they can take to prevent an episode and whether there is anything additional they should do if they experience one.