I did a lot of reading about this, because my partner ended up having this issue as well. It was right after we'd both been REALLY sick (might've been the flu because we were both laid up for a very long time) and then when we'd have sex, he would get an intense headache!
Apparently, this does happen, and I notice it happens more to men than women, but both can have this issue.
We took a break from sex for about 3 or 4 days, and then it stopped. On occasion, this will happen, we try to make sure he stays hydrated and healthy, and that seems to help but still...we have those times!
Sometimes it can be caused by something underlying, though, so watch for other symptoms and such!