Mario Uribe Estrada pleaded no contest to two counts of lewd acts on a child and was immediately sentenced to three years in state prison, the release stated.
Estrada, 41, had been assigned to the Metropolitan State Hospital when he committed the crimes, though the victim had no connection to the facility, investigators said.
Estrada, who was arrested and charged in May, was also ordered to register as a sex offender for life.