Having sex may be the solution to curing a splitting headache. Researchers from the University of Munster in Germany have found that sexual activity was successful in treating migraines in 60 percent sufferers and in one-third of patients with cluster headaches.