OP, I've had this for over ten years. I'm not saying this to freak you out; there's no reason why your sexual headaches should follow the same course as mine. But you really should go to your GP with these symptoms, and get a referral to a hospital neurology dept for a scan of your head. This is because an orgasm headache can be a sign of something quite serious - like aneurysms or intra-cranial bleeds. It's very unlikely to be any of these things, but they're so serious you can't ignore them, so please, please go and get that scan. It's bad enough worrying you might have a headache when you come, without worrying it's going to kill you or disable you, right?
Once you've had that, the most likely thing that will happen is that your sex headaches will go away. Mine did, but they came back, and I got a diagnosis of Benign Sexual Headache. Which I knew weren't going to kill me, but seriously messed with my sex life. The best advice I got was from a female neurologist, who told me to keep an orgasm diary. Not just when I orgasmed and whether a headache occurred, but HOW I orgasmed - sex, masturbation, on top, underneath, standing up, lying down, heavy breathing, anything that seemed relevant. I quickly realised that masturbating standing up was a trigger, so that had to stop!
Another neurologist made me give up coffee, which at the time I was scornful about, but has helped a lot - I was drinking maybe a dozen cups a day. Still another neurologist (male) told me it was 'nothing to worry about' and I was furious. What he meant was, I suppose, you don't have a brain tumour, you're not going to die. But it fuckin well IS a worry if your head feels like a bomb's gone off inside right at the moment you come; I literally feel your pain, OP.
Self-care is the key: I've had to realise that quality over quantity is super-important - ie being properly aroused meant orgasms came naturally (sorry) and with less danger of a headache, whereas trying to come too often meant I was straining for orgasm and this was associated with the worst headaches. I'm 58 now, so one every week, or even 10 days, feels about right. One of the things that stemmed from the orgasm diary was writing my own pornography. I know that sounds weird but it's really helped. I've never really liked 'regular' porn but sexy scenes in books really turn me on so I wrote scenes of my own, bespoke porn if you like, and that helps massively with being properly aroused if I'm doing my own thing. I never realised I was having so many 'low quality' orgasms - typical bloke, I thought all orgasms were equal, despite lots of evidence to the contrary. And I've learned that arousal without orgasm is both enjoyable and necessary, and directly improves the sex that does continue as far as orgasm. The minute I feel I'm having to try too hard to approach orgasm, I stop, and save it for another day, and I don't feel frustrated, I feel like I'm looking after myself. I hope yours go away by themselves and don't come back. But if they do, don't despair. I feel I've been through the mill with this, but I have 9 out of 10 orgasms without headaches now.