Freud had Dreams serve to discharge pent-up energy associated with unsatisfied wishes. The new and old brain speak a different language entirely. Sleep seems to be necessary for mental health at least. The mind needs the sleep more than the body sleep may consolidation the memory or allow stockpiles of neuro transmitters in the brain to be replenished. Whatever it is, sleep is necessary.
Dreams seem necessary as well.
Possibly dreams transfer memories from one system to another. A traditional view of consciousness is as a gate keeper which focuses on one or more of the messages from subconscious memories, experience, feelings and such and decides which should be acted upon. The interest in dreams has been influenced by the discovery that understanding our dreams can help us conquer phobias and overcome personal problems. Dreams can be a key to self-knowledge in that we can where certain ideas come from. Sometimes by remembering what was going on in our life at a past time, we can understand why we came to believe a certain thing.