During sleep we are unconscious, but another consciousness is present regulating our body's functioning. It is the same consciousness, which we call 'instinct', governing animal activity, plant growth, rock formation, in short, the entire physical world, the consciousness referred to as the ecosystem, nature or "Mother Earth". Not so long ago, evolutionarily speaking, awareness was located in the body. Mankind was fully owned and operated by instinct. Like a baby in our Mother's womb, awareness developed and slowly grew stronger.
The evolution from instinct to a separate will (our current conscious state), took place when our awareness shifted into the mind, and the mind developed the capacity to deviate from instinctual behavior. Establishing a free will is the mind's transition from the physical world into the realm of thought consciousness.