Hello and welcome to HCM,
Sexual intercourse is not associated with any menstrual abnormality.Sex during menstruation
or few days before and after menstruation is safe as it does not lead to pregnancy
Headache and stomach upset
are unrelated with sexual activity.
However physical exhaustion during sexual activity and / or dysmenorrhea can cause cramping pain and tiredness
You can take symptomatic treatment for these symptoms.
There is nothing much to worry.
Thanks and take care
Dr Shailja P Wahal