If the mother is stressed, anxious or depressed during pregnancy then the resultant changes in her physiology can be transmitted to the fetus, impacting upon fetal development and subsequent childhood behavioural and emotional responses.
Research has shown that the older fetus can respond at once to how the mother feels. If she is anxious the fetal heart rate goes up. This has been shown in an experiment in which the pregnant mother is asked to play the Stroop computer game, and the fetal heart rate is monitored at the same time
Try the Stroop test for yourself, and look out for how mistakes affect the heart rate of the fetus.