Major pain during sex

LJ • Baby girl born Feb 19, 2015 and second girl born Jan 20, 2017. Baby #3 due in October!
Last night we were having sex and I was on my back. Feeling fine until all of a sudden was having major cramping that was so bad we had to stop. The pain didn't go away for about an hour, I was worried I was having a miscarriage. No blood showed. I took a frer this morning and the test line is stronger than three days ago. I am currently just over four weeks along. Pain was gone this morning when I woke up. Is this something to worry about?