Kojek Mista and four accomplices broke into a house in Tangarang, 20 miles from the Indonesian capital of Jakarta.
Mista and his gang held all the adults present in the house captive, according to the Jakarta Globe.
Indonesian reporters were told that Mista and his accomplices got into the property by scaling a wall.
Appearing at a press conference in Jakarta, Mista said that he made instant formula for the baby under instruction from the baby's mother Fance Lewa.
"I asked his mother how to make him stop crying. She said he had to be fed with milk," he said.
Lewa said that she screamed when she awoke to see the robbers.
She revealed that the gang pointed a gun at her, causing the baby to wake up crying.
Mista, who could face up to 10 years in jail if charged and found guilty of robbery, added: "I gave [the formula] to the baby while cradling him.
"Not long after, the baby fell asleep so I put him in bed. I have a kid, so I know how to cradle a baby."