A court at Verden in northern Germany found her guilty of murder through negligence but said she only had limited responsibility for the baby's death.
The 24-year-old was sentenced to two years and eight months.
Defence lawyers argued that the woman was in a state of shock and was unaware that she had been pregnant.
The prosecution, however, argued that she had known about the pregnancy for several days.
Germany has been plagued with a spate of gruesome infanticide cases in the last few years that have shocked the country. One woman who killed nine of her babies was sentenced to 15 years in prison in early April.
In May 2008, a 44-year-old woman was arrested when her family found three dead babies in her freezer near Bonn.