The Interpretation of Dreams by Sigmund Freud Chapter 7 Page 17

economical to give full sway to the unconscious wish, and clear its way to regression so that it may form a dream, and then restrict and adjust this dream by means of a small expenditure of foreconscious labor, than to curb the unconscious throughout the entire period of sleep. We should, indeed, expect that the dream, even if it was not originally an expedient process, would have acquired some function in the play of forces of the psychic life.

We now see what this function is. The dream has taken it upon itself to bring the liberated excitement of the Unc. back under the domination of the foreconscious; it thus affords relief for the excitement of the Unc. and acts as a safety-valve for the latter, and at the same time it insures the sleep of the foreconscious at a slight expenditure of the waking state.