Thanks for the query.
and sexual excitement will not initiate labor pains or affect the well being of the baby.
But sometimes in the later weeks of pregnancy
they can initiate labor pains.
So better to be cautious and prefer lateral position during intercourse.
And better to avoid intercourse after reaching term.