Thank you for your question.
Getting a headache following orgasm is quite common and can happen in both men and women. It is often the consequence of sudden vasodilatation associated with orgasm. The best remedy is to drink a couple of glasses of water and lie quietly. You may find headaches after orgasm occur specifically if you have not been drinking enough fluids prior to the event. Staying hydrated should prevent it from occurring again.
However, if this happens frequently or you develop symptoms of one sided headache, nausea, visual symptoms etc you need to consult a physician for a complete check up
hope this reassures you.