your headache is a type of exertional headache. It is also known as HASA (headache associated with sexual activity). it is not uncommon. in a recent study it was found that about 2.7 percent of total headache patients attending a headache clinic has HASA.It is usually a benign less harmful condition,still more serious brain diseases must be ruled out. You should go for a Brain MRI with MR Angiography to rule out any seriouz brain diseases. If it is normal then just relax. take some prophylactic medication like indomethacin or naproxen just 1 to 1 & 1/2 hours before sexual activity. if the headache is very frequent you can take long term prophylactic medication like propranolol.