Hi,
Welcome to the ehealthforum and I am really glad to help you out. Hardening of the stomach after sex is actually hardening or contraction of the uterus. If one is pregnant it will not harm the baby but intercourse should be avoided in the first and last trimetser as it can precipitate preterm labor in the last trimester.
I sincerely hope that helps. Take care.