A court heard Ben O’Connor was “out of it” at the time he carried out the attack on the young woman who was left traumatised by the incident.
O’Connor was sent to a young offenders institution for four months over the incident which took place on August 3 last year in a graveyard in Normanton, near Wakefield.
Michael Smith, prosecuting, said the victim, aged in her twenties, was taking a shortcut through the graveyard at 7.30pm when she saw O’Connor laid on the ground near some gravestones.
The prosecutor said: “He had no shoes on and was behaving weirdly.”
The woman feared O’Connor may have escaped from Fieldhead Hospital and offered to help him.
She crouched down and asked him if he would like some of the Sprite drink she was carrying.
She also offered to contact someone for him on her phone.
O’Connor then said: “I had a dream that I could kiss you but I couldn’t”
The defendant also made references to travelling in a time machine before grabbing her leg.
She managed to get away and police were contacted.
O’Connor was still in the graveyard when officers arrived.
The 19-year-old was interviewed the next day and said he could not remember the incident because he had taken magic mushrooms and cannabis.
O’Connor, of Rose Farm Approach, Altofts, pleaded guilty to sexual assault.
The court heard the victim’s university studies had been affected by the trauma of the assault.
Judge Mushtaq Khokhar told O’Connor: “A very helpful lady tried to assist you and when you did you sexually assaulted her.
“You got in that state by doing something illegal, and that is taking drugs.
“Drugs can’t be relied upon as an excuse to spare you this sentence.”