Amos Yee, 16, will be remanded at the Institute of Mental Health for two weeks to undergo further examination after previously being declared mentally and physically fit for an 18-month stint in a reformatory.
Yee was convicted in May on two criminal charges: wounding religious feelings in an expletive-laden video comparing Lee to Jesus, and circulating an obscene cartoon of the former prime minister, who died in March.
On Tuesday District Judge Jasvender Kaur cited a psychiatrist's opinion that Yee, who was being held at Changi prison, may be suffering from "autism spectrum disorder".
"I am of the view that I ought to explore the sentencing option of a mandatory treatment order," the judge said, rather than confinement in a reformatory.
Yee had been expected to avoid confinement after his conviction but rejected an offer of probation and reposted the offending video on YouTube, where it has generated more than one million views.
He also republished on his blog a sexually graphic cartoon involving Lee and the late former British Prime Minister Margaret Thatcher.
If Yee is sent to the Reformative Training Centre, he will have to undergo at least 18 months of rehabilitation, drills and counselling but will be kept away from adult prisoners.
After Tuesday's hearing the controversial anti-Lee video and cartoon were both unavailable for public viewing after Yee undertook to make them private.
Yee's case has gained national attention after critics of the long-ruling People's Action Party, co-founded by Lee, said he was a victim of censorship and excessive punishment.
But others attacked the boy for insulting both Christianity and the nation's founding father Lee, who was given a hero's funeral on March 29.
In a statement before the hearing, the United Nations Human Rights Office for Southeast Asia (OHCHR) sought the "immediate release" of Yee.
"OHCHR appeals to the Singapore authorities to give special consideration to his juvenile status and ensure his treatment is consistent with the best interests of the child," it said.
Phil Robertson, deputy Asia director for US-based Human Rights Watch, said "nothing that Amos Yee said or posted should ever have been considered criminal -- much less merit incarceration".
"Nothing short of Yee's release and the dismissal of all charges will vindicate Singapore's justice system," Robertson added.