Osho said that most of us sleepwalk our way through life. We are never fully aware of our surroundings, we are never really present in what we are doing, and nor do we even know why we say or do many of the things we say and do! Our mind is always bombarded with a never-ending stream of thoughts, and they flow so quickly that they leave us unaware of what is really happening, and who we really are. Basically, it is as though we are living in a sort of dream state, and we do so our entire lives.
Our lives are mechanical, automated and lacking in awareness. While we sleepwalk through life, all we do is express our conditioning, habits and impulses, but not our true essence. So this is what Osho means by functioning in sleep: acting out of habit or impulse, but without any awareness of what is really happening. When we function in sleep, we are not really there: we are somewhere else, lost in our thoughts about the past or future, anywhere but where we are. We are absent and distracted.
Yes, we have become very efficient at doing most of the things we do, but this is part of the problem: we have become so efficient that we no longer need to be aware of what we are effectively doing to get it done. We have become like robots, meaning that we are unable to fully enjoy our experiences and feel satisfied and at peace. Acting automatically is like moving while we are anaesthetised, a state which is unable to allow us any enjoyment and is the basis for our lack of attention, because it distracts us from something else. If, while we are doing something, we are thinking about something else, it means that we are not present, and this, according to Osho, is the root of all evil.