"My 4-year old daughter will only poop in her diaper during her nap or at night shortly after she lies down in her crib."
Pooping in bed, while sleeping or while falling asleep, is not uncommon for children who have experienced painful or uncomfortable bowel movements. Pooping in bed sometimes happens when a child has been intentionally (knowingly) withholding poop during the day in order to avoid having another painful bowel movement. Intentional withholding requires a child to pay close attention during her waking hours for bodily signals of poop urgency (the need to poop). However, just before or after a child falls asleep, when she is relaxed and less attentive to her need to poop, her anal sphincter relaxes and the poop she has been holding back is able to pass.
Pooping in bed can also occurs when a child becomes functionally constipated which is when withholding poop to avoid pain has become habitual. These children do not actively or intentionally withhold their poop. It just happens. However, functionally constipated children are somewhat less likely to poop in bed because their habitual withholding often causes stool to dry/harden in the rectum making it difficult to come out even if the child is relaxed.
Parents who have read my book "The Ins and Outs of Poop" and are still struggling with their child's "bed pooping" are welcome to to go to my website www.theinsandoutsofpoop.com where they may request a personal telephone consultation with Dr. Tom.