Even nightmares are in service, though it would not seem so for they are accomplishing something. Nightmares are a mechanism for playing out something that needs releasing, or needs to be faced. They serve to get your attention in an undeniable way. I never met a nightmare I did not come to appreciate.
Shakespeare nailed it when he referred to sleep as knitting up the unraveled sleeve of care. That it does, when it is deep and restful. But dreaming is also connected with traveling throughout the worlds and universes at large. We die to this world every night and are born to other worlds but then, our Soul, understanding we are not done here with our purposes, returns us. Like little lambs, our Soul sees to it that we return to our body, wagging our tails behind us, ready to take on life in the physical again, fortified and, in the case of perfectly marvelous dreams, greatly inspired.
Such a gift, dreams. Lifesaving, really. Just another example of how taken care of we are.