Sex Gym and Pain

Every time i had and then hit the gym... i feel like my uterus is contracting so bad and i’m in so much pain wanna know if anyone has the same problem if so what can i do?