There's the case of the woman who sought help from an expert because her night-time activity while asleep was making her husband feel inadequate.
"It was her partner who was annoyed," says Dr Antonio Fernando, a New Zealand sleep medicine specialist.
"Why am I not part of this? Are you not happy with me? She had no idea what he was talking about."
Then there was the man who on a few occasions biked while asleep from his home in Mt Eden to his gym in the city.
Actions we do while we are awake that do not require much thinking, including those of a sexual nature, are common for those who sleepwalk, Fernando says.
"The behaviours are automatic. Eating is common, walking, urinating in the corner of the room thinking it is a toilet, driving. It sounds bizarre but we don't actually require a lot of thinking when we are driving.
"Your eyes are open and you are still processing external information. When people are sleepwalking they don't fall on the stairs. They process the visual information and the behaviour is automatic. How often do you consciously think about walking? You don't."
The woman and the cycling man were suffering sleep disorders from the parasomnia group which include sleepwalking, sleep-eating and even driving while asleep.
The woman, specifically, was suffering from sexomnia.
The term was coined in 2003 in a research paper in the Canadian Journal Of Psychiatry which described the cases of 11 patients whose parasomnia behaviours were sexual and concluded it was a distinct type of the condition.
There's also the more serious cases.
The ones that end up in court.
Sexomnia reflects scientific research but comes with the risk it may be seized upon by malingerers as an excuse for criminal acts.
The courtroom defence is automatism, a legal term simply meaning action without conscious thought or intention.
It's cropping up more and more around the world, with five known cases dealt with by New Zealand courts. The most recent example was the acquittal earlier this year of 35-year-old Tristan Corey Scott.
He was found to have indecently assaulted two teenage girls while they slept in their beds but the judge dismissed the charges after finding that intent could not be proven because the man was effectively sleepwalking.
In dismissing indecent assault charges against Scott, the judge found the offences were committed while Scott was in a state of "automatism caused by excessive alcohol consumption".
Scott has an earlier conviction for similar offending committed before parasomnia was diagnosed.
In 2013, a man was acquitted of indecently assaulting a girl, aged between 12 and 16, after claiming he must have been sleepwalking. He had walked into her bedroom while she was sleeping.
The man said he had no memory of the event and must have been sleepwalking as he woke only when the girl's father started punching him.
In another case, a woman awoke on numerous occasions to find her husband having sex with her during the seven years they were married.
Initially she accepted his sexomnia explanation but came to doubt it, particularly after he admitted being awake after one of the incidents.
During one of the attacks, she tried to trick him by asking the time. He looked over at a clock near the bed and told her, a 2017 Court of Appeal Decision states.
The man was found guilty on three charges, including one of rape. But he was found not guilty on some other charges, which the Appeal Court said suggests the jury accepted it was reasonably possible he was asleep and his conduct was therefore not deliberate.
In 2008, a Whangarei man was found guilty of indecently assaulting a girl aged between 12 and 16 despite evidence of a history of parasomnia episodes.
He claimed he had no memory of the incident and must have been asleep. He was sentenced to nine months' home detention.
And in 2006, a man was found not guilty of a sexual offence involving a young girl on evidence that he was asleep at the time.
The difficulty for the courts lies in determining whether the person was in a sleep-state.
A clue is looking at whether they had a long history of other forms of parasomnia. Sexomnia is regarded as the last of those types of conditions to emerge.
Academic researchers have noted that this has important legal implications in that a first-time alleged sexomnia episode that results in a legal sexual assault charge should be viewed with great skepticism, and raises the strong suspicion of a "sexomnia excuse".
Most cases of sleep sex recorded in psychiatry literature involve men.
Women suffering from parasomnias tend to be less violent but more vocal, Fernando says.
"They talk a lot and they scream a lot. So they don't usually get into trouble. Most of the time, men tend to be quiet but violent.
"It can be quite dramatic. It can be rape really, or assault." Fernando, who lecturers in psychological medicine at Auckland University and practises privately, gave evidence in the Scott case and the husband and wife case.
He told the Herald on Sunday he can never categorically state whether someone was asleep at the time a crime was committed.
Fernando, who has testified for both the prosecution and defence, says there was no definitive test of whether a person was asleep.
"I never say, 'He was asleep while this happened' when I give evidence because there is always a possibility he was conscious.
"You look at the whole picture, at family history, at reports from family, from previous partners.
"There are certain signs ... how they behave that suggest they are asleep or not asleep.
"The science is getting deeper but it is still a very tricky part of medicine."
From that, he may give an opinion about the possibility or probability the person was asleep.
Even the example of the husband responding when asked the time is equivocal, says Fernando, because sleep can be quite superficial for people with parasomnia and being asked a question could bring them to wakefulness.
There are many documented cases of parasomnia where the person is truly asleep when "they do a lot of crazy behaviours", Fernando says.
"Sex is just one of the many automatic behaviours.
"The behaviours are often mechanical and don't involve a lot of high-level thinking like discussing the politics of Trump versus Jacinda [Ardern], because that involves a different part of the brain."
Sexomnia is rare and examples that end up in court are rarer still. Fernando says Auckland University is about to begin a project to identify all Australasian cases but there is thought to have been only a few in New Zealand.
The most common sleep problem people come to him with is insomnia. Parasomnias, such as very vivid nightmares, problem sleepwalkers, people who kick in their sleep, and extreme teeth-grinding, are also common.
Most of the time the condition can be treated through medication, lifestyle changes, or both. Alcohol, sleep deprivation and stress are considered common triggers.
The cases in the 2003 Canadian journal ranged from masturbation to sexual assault resulting in prosecution. In each criminal case the defendant was acquitted.
The report said steady progress has been made in identifying "the complexity of nocturnal behaviour from a time when somnambulism (sleepwalking) was the only parasomnia known to medicine".
It noted that subconscious sexual intent derived from the sex drive was "deeply-rooted in the human psyche ... and for this reason, we cannot exclude the possibility of genuine parasomnia that features such underlying intent".
But it also warned about fakes, and said the incidence of possible malingering may be higher than for other parasomnias.
There have been a number of cases in England where a defence of sexomnia was successfully run and a couple in New Zealand, says Professor Warren Brookbanks, an expert on psychiatry and the law.
There are also examples where the person was trying it on and the sex was not consensual.
It usually requires evidence from a sleep expert, says Brookbanks.
He expects most judges would be attuned to the possibility people may try to malinger these defences.
He points to the case of the husband and wife.
"He rolled over, checked his watch and gave her the time, so he wasn't asleep at all."
- Additional reporting: Martin Johnston
Waking up to sleep disorders
• Two-three per cent of the world's population are affected by sleep disorders called parasomnia.
• They cover a range of automatic behaviours we do when awake: talking, walking, having sex, driving, cooking, texting, eating and dressing.
• Sexsomnia is a subset of parasomnia first identified and named by researchers in 2003.
• There are five known cases where sexsomnia has been used as a legal defence in N ew Zealand.