Pain during sex


I’m ovulating tomorrow and the past three days sex has been painful, last night we finished and it instantly felt like I was going through contractions. It hurt so bad I couldn’t move but couldn’t sit still. I fell asleep a bout a half hour later once the pain subsided enough. Why would that happen?