We all intuitively associate poor sleep with irritability, but we don't normally associate sleep with our basic emotional wellbeing and stability. Apart from its ability to alter our mood, we don't consider our emotional life to be actually constituted, in part, by sleep quality. Our daytime experiences impart the principle material for that constitution. For us, everything meaningful is embedded within an emotional or feeling-based core. One of the basic functions of sleep is to prune the massive clutter of information entering our brain on any given day, and to firm up the far reaching associations that are important for intelligence, dexterity, creativity, and memory. That very same process is at play addressing our emotional life.
We tend to forget that a great deal of emotional processing has to occur in order for our brain to establish the important facts to remember and incorporate into our mind daily. During sleep, the brain needs to prune out not only irrelevant connections, but a massive amount of competing relevant ones. How does it do it? To some degree, by the emotional relevance of the experience. But that means that the brain must re-create the ability to absorb new emotional information the next day. If it does not, it gets bogged down by previous emotions. They begin to take on a life larger, and usually more negative in tone if they are not adequately processed during sleep. They become highly volatile and off-balance. Thus we become volatile and off-balance.