It is a fairly well-known response, sometimes called an "orgasm-triggered migraine" or
coital cephalgia.
http://headaches.about.com/cs/triggers/a/ha_orgasm.htm
According to this article, they are more common in men than women, at a ratio of 4:1. The first time it hit me, I thought I was having an aneurysm. I was scared to have sex for a long time after that. It only happens occasionally, and usually when I've been having difficulty finishing and working hard to get there. I haven't asked my doctor about medications, but after reading that article I may.