When they asked about an odor in the apartment, the mother confessed that it was from her child’s body, which was hidden in a closet, police said.