The 47-year-old victim had taken a painkiller and fallen asleep with her hospital gown just before 3 p.m., Friday, according to police. She awoke to find Tyrone Brown, 49, of Harlem rubbing his penis on her mouth, cops said.

“He was in a hospital gown,” a sources said. “She was waiting to be seen, and he was already there.”

As the victim came to and tried to run away, she felt a warm liquid and then realized Brown was urinating all over her, sources said.

Hospital staff held Brown until hospital police arrived.

He was charged with committing a criminal sex act and taken to Bellevue Hospital for a psychiatric evaluation, police said.

Brown has an arrest record stretching back to 1981, mostly on theft-related charges such as grand larceny and criminal possession of stolen property, sources said.

A spokesperson for the hospital could not be reached immediately for comment.