The same thing happened to me when I orgasmed, (but it also happened when I almost threw up. or gagged,-changing poopee diapers- or coughed really hard, so I think it was caused by my muscles tightening up, for me, though the pain WAS INSIDE my head, so I don't know) It was on the left side of my head behind and a little above my ear. It only went on for a few days, (once or twice a day with the actions above) and just like yours, it became more of a dull ache. I went to the doctor, and told her the whole truth... including happening during orgasm. She sent me for a cat scan. They didn't find anything, and it hasn't happened again since that few days. So, I never really got an explanation. I hope it doesn't happen again, and I wish you the best.
Some people experience headaches when undergoing strenuous activity. Certainly, various sexual activities can be quite strenuous. ANY vigorous exercise is bound to create some symptoms such as headache. And there can be other complicating factors such as drugs/medications, alcohol consumption, anxiety, etc.
However, if this pain continues, you might want to consult your doctor to find out if there are any underlying medical conditions, such as high blood pressure, etc. Best of luck to you. Dr. J