Discomfort during sex

Sometimes when I have sex my stomach begins to get hard and will feel very strange. I don't know if It's "painful" but it's certainly an uncomfortable feeling and we have to stop midway. What do you think is happening???
21w4d