There's a few details you left out which would help - like - has this always happened at this "time" or is this only recent? Your age? Are you having intercourse with someone other than your usual partner?
Possible causes could be:
guilt (going behind a parents back, cheating on partner, or even just the fact that you're getting pleasure from sex - unlikely if this is recent rather than a long term issue);
age & hormonal changes could cause migraines (which is what you seem to be describing);
if this started when you first started sex & orgasms then again I think of hormonal issues which often cause women to have migraines.
Religion? Some religions teach that women should not enjoy sex so therefore if you enjoy it you may feel guilt & so "punish" yourself with a migraine.
Just some thoughts based on the very little information you gave.