Paul Glenn dragged James Campbell into Bingham's Pond in Glasgow's West End and held his head under the water. The 21-year-old then threatened to kill a passer-by - before brandishing a rock at another man.
Glenn later claimed a voice had told him Mr Campbell, 50, who suffered a broken nose and bruising, was the devil.
Glenn - who suffers from schizophrenia - was a patient at the time at the nearby Gartnavel Royal Hospital.
But, the High Court in Glasgow was told despite undergoing treatment for psychosis, he was allowed to "come and go" from his ward.
NHS Greater Glasgow and Clyde insisted it was "not uncommon" for patients such as Glenn to be given time away from hospital.
Glenn faced charges of attempted murder and behaving in a threatening manner when he appeared in the dock in October.
A judge acquitted him after two psychiatrists found he was suffering from a mental disorder at the time.
Glenn will be detained at the State Hospital in Carstairs.