Babies poop anywhere they please and that includes inside your body. After all, the spend nine months in the womb and they're not just kicking and listening to Mozart in there. The fetuses, gentle reader, are pooping in their own amniotic fluid.
A 2003 study actually observed the anuses of 240 fetuses sonographically between weeks 15 and 41 of gestation. The researchers detected one or more defecations in every single test subject, especially during week 28 and 34 of gestation. We even have a name for this crap: meconium.