A man accused of indecently assaulting a child has been acquitted because he had "sexsomnia" and was asleep and oblivious when the acts occurred.
The man told the NSW District Court he was stunned when police arrested him in November 2019 and learned the girl had made accusations against him.
The man, who cannot be named for legal reasons, told his trial in April didn't doubt she was telling the court the truth but he had no memory of touching her vagina and chest while sleeping next to her on two occasions in 2019.
He was found not guilty after experts gave evidence that he had a condition called "sexsomnia".
It's a disorder that leads a person to engage in sexual acts while they're sleeping. The term was coined by a Canadian professor in 2003.
The prosecution conceded the condition meant he did not touch the girl voluntarily and he had no control over his behaviour.
The girl, aged under 10 years, told her mother something "horrible" had happened the day after the second incident.
She wrote her a letter saying the man had touched her "on the girls part on perpos (sic)".
The girl said in evidence she had climbed into the man's bed in November 2019 after being scared by loud voices on the street.
She said he touched her vagina and she told him "no" in a strong voice. He was soon silent and began snoring.
It was a repeat of an earlier incident in July, when the girl shared a bed with the man while they were both sleeping over at the house of a friend.
On that occasion he touched her on the vagina, forcing her to grab a pillow to cover her private parts when he got up to go to the bathroom.
The man had been drinking before going to bed on both nights.
The man's ex-partner had told him he had occasionally sexually touched her while asleep. Subsequent partners made similar observations.
The man, who was a 42-year-old teacher at the time of the incidents, was seen by mental health and sleep experts who told the court he had a sleep disorder.
A sleep study showed he was grinding his teeth and moving his limbs during sleep.
His ex-partner said that on a number of occasions she had found him sitting up in bed, asleep and talking about a cricket game.
These sleep-related episodes helped psychiatrist and sleep medicine specialist Dr Antonio Fernando conclude the man was not feigning his symptoms.
In a judgment released last week, District Court Judge Richard Weinstein found the man had no paedophilic tendencies and acquitted him.
The man said he was committed to ensuring it never happened again.
The prosecutor had argued "sexsomnia" was a mental disorder which - if accepted - would have led to a different verdict being recorded.
But although the term "sexsomnia" has appeared in the Diagnostic and Statistic Manual of Mental Disorders since 2013, the court found it was not a mental health impairment.