Epigenetics occurs also in the uterus affecting the fetus. One of the ways that nature prepares a new baby to survive in the outside world is by adjusting the baby’s length. Larger people require more calories and protein than shorter individuals, so if the mother’s nutrition indicates that there may be a shortage of food in the future, the baby’s genes are changed in the uterus and in the first 1000 days of life so that the baby will be smaller and require fewer calories. When that baby grows into a shorter smaller adult and is exposed to a high fat/high sugar Western diet, obesity is likely to occur.
The idea is the basis of what is called the Barker Hypothesis named for the English epidemiologist who originated the idea. It is the mismatch between the expected environment of food scarcity and the need to conserve calories together with the excess of calories and lack of exercise in our modern society that interact to create so many overweight and obese people around the world.