A likely objection to my metaphysics is the existence of sleep. I claimed that souls are what exists and the universe is nothing but an object of perception, and also that the universe can never directly alter a mind's state but has to do so by causing perceptions. This probably seems to cause difficulties with the idea of sleep: just what is the phenomenon, first of all? Why should an immaterial being with no physical properties need such an arbitrary thing? Most of all, why does it seem like the body's cooperation is required for the mind to fall asleep? Don't worry; I've got answers for all this.
Souls need periods of not consciously controlling themselves because free will is tiring. Holding the "reins" of your mind for so long makes you mentally tired just as you can need to take a break from an intensive task, physical or mental.
The phenomenon of sleep is that when you go to bed and no longer have any actions to take, with no meaningful interaction with the world, you'll inevitably spend your first few minutes thinking about all the experiences of the day, but eventually you'll run out of things you want to think about, and finally, it's possible to stop thinking. At that point your brain completely turns off your perception. (Part of the magic of the human brain's design is the way it creates the "blanket of sleep" effect as I call it, which by dampening perception helps the mind to fall asleep.)
This is actually the same phenomenon as death. The only reason you're ever able to wake up is because your brain is programmed to signal you (turning your perception back on) once the body's done resting. If your brain is gone, you have no way to wake up.
I'd imagine that when you get "knocked out" by physical trauma of some sort it wouldn't be this phenomenon, it would be the same flow-of-time thing I used to think was behind sleep as well, namely: what's happening isn't actually anything involving the sleeping person, but everyone else is experiencing time that you aren't. When you wake up, it's the very next moment in your experience; you were never actually "unconscious" from your own perspective.
It's also possible of course that there's some time on one or both ends - you may not actually go out immediately when you seem to, and you may wake up mentally sooner than you start to move again. I've no first- or second-hand experience with the phenomenon, so I wouldn't know, but I'd expect it could be either or both or neither depending on the case.
Dreams are written by instinct. I don't think there's much to understand about how they're determined; it's probably just the normal inscrutable ramblings of the subconscious. I think the reason you have dreams at all is because a mind can't actually stop experiencing. The mentally refreshing thing about sleep is not having no experiences, but having a stream of consciousness fed to you that isn't controlled by your will.
I'm not certain if dreams are real perceptions or if they're just imagination. Fully understanding imagination should cast the final bit of needed light on this.
The occasional phenomenon of being woken by a dream is not hard to explain either. It's quite intuitive that a sufficiently startling experience in your dream can cause your instinct to signal your brain to turn your perception back on. After all, we know from other phenomena that instinct can control your brain without conscious input (like flinching or any other motion you make without consciously choosing or realizing it).
I can explain lucid dreams too. I think the experience in a dream of thinking about whether it's a dream can cause your instinct to wake up your will again, and without signaling your brain, leaving you in a state where you have real perceptions and free will but the perceptions are being generated by your instinct.
That phenomenon isn't totally unique. I'm pretty sure instinct - and even choice - can directly affect perception. When I was about fourteen or so I first discovered what I called Visual Field Manipulation. I noticed that in the dark with a small spot of light visible, if I focused in the right way and tried for long enough, I could often make the light disappear entirely from my vision.
And yes, I do know about the eye's blind spot, but I was doing this with both eyes wide open. I'm also pretty sure the blind spot can't account for the size I was able to do it with. After I practiced this a bit I could make a large portion of my visual field go completely black from low light.
Often it would fade gradually once I got it started, and the most frequent limiting factor was needing to blink before I had time to let it finish disappearing. But I digress.