She was worried her husband would leave her if she had any more children, officials said.
The woman, who has been arrested on five counts of manslaughter, made a “comprehensive confession” to the killings after turning herself in as a six-year investigation closed in on her, said Ulrike Stahlmann-Liebelt, the head prosecutor in Flensburg, on Germany’s border with Denmark.
Ms Stahlmann-Liebelt said the woman, whose name was not released, has two living children, aged eight and 10. But then in 2006 she began hiding her pregnancies, staying away from doctors and hospitals and killing the infants after giving birth to two at home and three in the woods, she said.
“She had the impression her husband would leave her if she had any more children, and that’s why she didn’t tell anyone she was pregnant, including her husband.
“She has said that the family lived at a certain level of prosperity, that it was clear her husband did not want any more children, and that one reason was to preserve this standard, and she feared that might be endangered if another child were there.”
The husband has told police he knew nothing about the pregnancies, and it was not entirely clear how the woman managed to keep them secret.
Police found the first infant’s body dumped in a paper sorting station in 2006 about 15 kilometres (nine miles) away from the town of Husum where the woman lived. The second was found in a parking area off a regional main road.
After reading news reports that DNA results had confirmed the two children had the same parents, the woman hid the next three infants in boxes in the basement of the building where she lived.
The bodies have now been recovered and post mortems have been carried out, but no cause or dates of their deaths has been established.
A judge has ordered the woman held in custody pending a formal charge, which typically takes several months.