Sound too good to be true? Research backs up the finding: A study published in February 2013 in the journal Cephalagia found that 60 percent of people who had sex during a migraine attack experienced some improvement in their headache symptoms. One theory is that sex may distract people from their pain. Another is that sex — in particular, an orgasm — releases endorphins, which can also help relieve pain, says Alexander Mauskop, MD, director and founder of the New York Headache Center. Endorphins, which are opiate-like chemicals, are associated with a happy, positive feeling and can keep pain messages from reaching the brain, he explains. Unlike pain medications, which can take up to 15 minutes to kick in, these chemicals can work almost instantly. Other people aren’t as lucky. Like exercise, sex is a physical activity, which can put pressure on a person’s back and neck, bringing on a migraine. Plus, sex can increase blood pressure and cause a dilation of the cerebral blood vessels, which can also trigger an attack. “Headaches during sex are most often seen in people with migraines because these people have a genetic predisposition to develop headaches already,” says Mark W. Green, MD, a professor of neurology, anesthesiology, and rehabilitation medicine and the director of the Center for Headache and Pain Medicine at the Icahn School of Medicine at Mount Sinai in New York. (Although most migraine symptoms are similar — sensitivity to light, sound, and certain smells; nausea; and a constant, throbbing pain — migraine causes are different for each person.) According to Dr. Green, sex can cause three different types of headaches — explosive, tension, or positional — which can all lead to migraines The most common type of headache triggered by sex is the explosive headache, which occurs at the point of orgasm and can have similar symptoms to those of a brain hemorrhage. Anyone who experiences this type of headache for the first time should talk to a medical professional immediately after the incident to rule out a hemorrhage or other brain injury as the cause of the headache, says Green. A tension headache — usually caused by stress, including tension that is brought on by the act of sex — feels more constrictive and usually goes away within 20 minutes. The rarer positional headache (which can occur from spinal surgery or an epidural) can be harder to diagnose. Doctors may treat them with IV fluids — caffeine and anti-nausea drugs. But fortunately, most positional headaches are mild; they tend to last only 24 hours and usually do not require treatment. However, if you’ve recently had spinal surgery or an epidural and you experience this type of headache, you should consult your physician. Keep in mind that sex is only one possible trigger — or remedy — for a migraine. Talk to your doctor about other ways to keep pain at bay.