Jaren Kuester, 31, sat stoically through testimony from the victim's relatives, the Wisconsin State Journal reported.
Before sentencing, Kuester apologized for the slayings and said he'd lost touch with reality.
"I'm sorry," he said in a statement to the court. "Looking back, I never imagined anything like this happening."
Prosecutors said Kuester broke into the rural farmhouse near Wiota in April and killed the victims with fireplace pokers.
Lafayette County prosecutor Kate Findley said the killings were among the most vicious crimes ever committed in the county. She asked the judge to sentence Kuester to three consecutive life commitments to a mental institution.
Dane County Circuit Judge William Foust acknowledged the request but instead included conditions that Kuester never be released from confinement.
"There are no winners in this courtroom today, only people who have lost," Foust said.
Earlier, relatives of the three victims said they are still haunted by the killings and are not sure that Kuester's lifetime commitment will bring the family closure.
Bryan Thoreson fought back tears this week as he recalled the April deaths of his parents, 70-year-old Gary Thoreson and 66-year-old Chloe Thoreson, and his uncle, Dean Thoreson, 76.
"The whole event just haunts us," he told the State Journal. "There's an emptiness that won't go away."
Kuester, who pleaded guilty in December to killing the three, had broken into the house after wandering the countryside in what his parents said was a delusional state.
Family members gathered Wednesday to share memories of the three victims. Relatives remembered Gary and Dean Thoreson as capable farmers who were active in church and schools, and they recalled the deep love between Gary and Chloe.
Chloe first spotted Gary when he was standing at the bar in a Monroe restaurant, said Rose Thoreson, Dean's widow.
"She never took her eyes off of him," Rose said. "She sketched his face on a napkin, gave it to the bartender and said, 'Give this to that guy across the bar.'"
Family members also talked about the unending emotional pain that has seared their lives.
"I think there will come a time - at least I'm hoping - when it becomes less intense," said Krista Kreil, Bryan Thoreson's older sister. "But it's definitely not something we're going to get over anytime soon. It's just too overwhelming."
Prosecutors said Kuester killed Gary and Chloe Thoreson minutes after they arrived home from visiting Kreil in California. Kuester had already killed Dean Thoreson when he went to check on the home prior to their arrival, the criminal complaint said.