One of my colleagues has the kind of job you might see on a television crime series like CSI. He is a physician who specializes in forensic sleep medicine. In English, he is an expert in crimes committed while the suspect purportedly remains asleep.
As an example, occasionally there are murderers who may suggest that their crime was done while sleeping, the deed part of a vivid dream. This may be an attempt to avoid punishment, or based in fact. Careful assessment must occur to see if this individual has a sleep disorder that might allow this to happen.
Curiously, there are specific sleep disorders like parasomnias and REM behavior disorder that may allow unconscious crimes. It is thought possible for areas of the brain controlling actions to be active while other parts controlling consciousness remain asleep. Most of us are paralyzed during dreams, but if this system malfunctions we may act things out inappropriately.
Therefore, in some sleep disorders the person may feel asleep but still be able to do things, including complex actions like eating, driving, or even murder. An accused criminal would need to demonstrate on a sleep study that they have an impaired control system that would allow dream-enactment behaviors.
Such phenomena gives more evidence to my belief that sleep is fascinating -- and that one should be wary of things that go bump in the night.