Have you ever had a migraine right after sex? Or perhaps you've initiated sex to relieve your migraine? You're not alone. While headaches triggered by sexual activity are rare, they can happen. According to a 2013 study by Cephalalgia, sex improved 60 percent of people's migraines but exacerbated 33 percent of the rest.

So, what does that mean? How can sex cure and cause migraines? How do you know which one you're going to experience?

Orgasms aren't blissful for all

Edward Riley, a 37-year-old from Michigan, understands firsthand how orgasms can lead to a migraine. After sex one night at the end of last year, he felt a brutally sharp pain in the back left side of his head. The second time this happened, he experienced nausea, a blood pressure spike, a headache and dizziness for days. For two weeks, he felt this pain every time he was about to orgasm.