You can have sex right up until your water breaks if you want to. Although if you are having contractions, you probably won't want to. Unless your Doctor tells you not to, you are fine. Your baby doesn't mind at all, it will not be hurt. The motion can actually put your baby to sleep.