Pregnancy sex

I'm about 6 months pregnant with my first. I noticed when I first got pregnant, having an orgasm was at first uncomfortable. Now that I'm further along it's almost painful. My stomach tightens up and it's like my uterus gets really hard and my baby is literally curled up in a ball. I can't enjoy sex or masurbating because of this. Does this happen to anyone else? Is there a way to prevent it? I've tried relaxing and going slower but it still happens.