Unconsciousness is not the same thing as the unconscious mind, which is assumed to operate even whilst the individual is conscious.
In jurisprudence, unconsciousness is a possible defense by excuse; via which, a defendant may argue that they should not be held criminally liable for actionss which broke the law. Courts rarely consider "falling asleep" (especially while driving or during surgery) to be an acceptable defense; however incidents related to epileptic seizure, neurological dysfunctions and sleepwalking may be considered acceptable.
See also:
Jurisprudence