The 27 year old is accused of stabbing four people at the train station in Grafing, a commuter town east of Munich, killing one of the victims, a 56-year-old male.
He was arrested by police at the scene shortly after, with the knife still in his possession.
Bavarian police confirmed on Wednesday that the man had spent a day in hospital in Gießen, in central Germany, after his grandparents urged him to seek psychological help.
On Monday morning he left the hospital. According to newspaper TZ, the grandparents had tried without success to have him placed in psychiatric care by authorities.
The suspect is now being held in custody on one charge of murder and three charges of attempted murder.
He is set to face an investigating judge on Wednesday afternoon who will decide whether he remains in police detention or is brought to a psychiatric unit.
Meanwhile, at the site of the crime mourners laid down flowers and candles which could be seen on the steps to the train station on Wednesday morning.
One note read “Heartfelt condolences to the families and friends of the victims. We mourn with you.”
The local Catholic church has planned a memorial for Wednesday evening.