Rock star Peter Buck used automatism as a defence in court
Automatism is essentially a legal defence, arguing that a person cannot be held responsible for their actions because they had no conscious knowledge of them.
There are two types of the condition: insane automatism and non-insane automatism.
In legal terms, insane automatism is caused by a "disease of the mind", while non-insane automatism is linked to external factors, such as a blow on the head or an injection of a drug.
However, the distinction is primarily a legal one - the medical profession is unconvinced that there is any substantive difference between the two forms.
In relation to sleep, automatism is said to occur when the body's natural defence mechanisms, guarding against physical injury during unconsciousness, fail to work.
In usual circumstances controls are in place which stop us physically acting out our dreams.
Primarily this is to ensure that we do not cause ourselves any damage while asleep - but it also stops us attacking others.
However, these controls can be disturbed.
When this occurs during a phase of deep sleep it can result in sleepwalking, which is usually benign and only ever results in injury to the person doing the sleepwalking.
However, if the controls are disturbed during dream sleep, this can result in more serious problems, with people potentially acting out the scenarios taking place in their dreams.
In some people the controls misfire naturally, but in others medication or alcohol can be the trigger.
Peter Buck, guitarist with the US rock band REM, successfully used the defence of non-insane automatism when he was acquitted of attacking airline staff on a transatlantic flight to London in 2002.
The concept had been previously tested in English courts in the case of a man called Burgess.
The defendant had visited his neighbour, and she had fallen asleep on the sofa while watching videos.
She awoke after being hit on the head to find the defendant standing over her, about to bring the video recorder down on her head.
Shortly afterwards Burgess appeared to come to his senses, and showed great concern for what he had done.
He claimed he had gone to sleep, and only regained consciousness at the point at which he was holding the woman down on the floor.
The jury returned a verdict of not guilty by reason of insanity, and an order was made for the accused to be detained in a psychiatric hospital.
However, he argued on appeal that he was not suffering from a mental condition, but from non-insane automatism.
His argument was rejected.