People can act out their dreams
Mr Buchanan ran a series of tests on the woman and diagnosed her problem - sleep sex.
This is a condition completely distinct from sleepwalking and is a form of sleep disorder called REM behavioural disorder.
Normally, when a person enters a phase of sleep called the REM (rapid eye movement) phase, in which we can often dream, our bodies are immobilised.
In the case of sleep sex, this doesn't happen and the person can act out their dreams.
"If you are lying there dreaming about having sex with your wife and you just happen to be having sex with your wife then there's nothing there to stop the dream. You don't perceive that as wrong."
Stage 1 - passed through briefly when falling to sleep
Stage 2 - most of the sleeping time is spent in this stage
Stages 3 and 4 - deep sleep, when people can sleepwalk
Stage 5 - REM sleep, when people can sex sleep
He said people would not necessarily remember what they had done while they were dreaming.
"You only remember your dreams if you wake up during them.
"But even then, it can be very difficult to comprehend that you have done what you dreamed about."
He said finding out what was the trigger of the REM behavioural disorder and eliminating it could help.
Other treatments include medications to induce sleep or reduce muscle tone.
Mr Buchanan said almost half of all sleep sex cases were associated with psychological problems and, in the case of the woman he described, psychotherapy helped.