The article Study: Brain connections strengthen during waking hours, weaken during sleep at EurekAlert reports on on a paper Molecular and electrophysiological evidence for net synaptic potentiation in wake and depression in sleep by Vladyslav V Vyazovskiy, Chiara Cirelli, Martha Pfister-Genskow, Ugo Faraguna and Giulio Tononi, published in Nature Neuroscience.
The paper reports evidence in favour of the synaptic homeostasis (or synaptic downscaling) theory of sleep. This theory can be summarised as:
There is unfortunately a limited amount of material openly available which discusses this theory. The Nature Neuroscience paper only provides the abstract (US$30 for the full article). There is a chapter A Possible Role for Sleep in Synaptic Homeostasis in the book "The Physiologic Nature of Sleep" (which you can buy for US$110), and there is an earlier paper Sleep and synaptic homeostasis: a hypothesis (also only available as an abstract unless you want to pay US$30).
From reading the available parts of the above-mentioned book chapter, it can be seen that Tononi and Cirelli's theory concerns itself mainly with the possibility of synaptic downscaling occurring during non-REM (NREM) sleep, which is mostly non-dreaming sleep. However, on page 93, the authors consider the possibility that dreaming during REM sleep may achieve synaptic downscaling by a different mechanism from that occurring during NREM sleep. The suggestion is made that the random nature of neural activity during REM dreaming may cause synaptic downscaling.
However the notion of dreams being "random" has been challenged by various scientists, including Antti Revonsuo who has proposed the "Threat Simulation" theory of dreaming. (I could also mention that the idea of dreams being random conflicts somewhat with most people's personal experience of dreaming.)
According to my Dream-Maker theory of dreams, dreams are anything but random, indeed they are the result of a goal-directed search for simulated experience that serves some (unknown) biological purpose.
The Dream-Maker theory can be reconciled with the synaptic downscaling, if we supposed the existence of two different types of synaptic downscaling. The first type is non-task dependent downscaling, and it occurs during slow-save NREM sleep, as hypothesised by Tononi and Cirelli.
The second is task-dependent downscaling, and it involves the downscaling of synaptic strengths of neurons that are overly active during the performance of specific information-processing tasks. (Note: by "tasks" I mean tasks in an abstract information-theoretic sense, which could be purely perceptual tasks, or they could be actual decision-making tasks.)
It is this second type of downscaling that would occur during dreaming. The Dream-Maker is actively searching for situations where the processing tasks cause too much activity among particular groups of neurons (for example within a particular cortical map or module), and in order to optimise the operation of those neurons, their synaptic connections must be reduced so that the overall firing rate of neurons within the group is reduced to some target level.
This theory can be somewhat generalised, to suppose that some sort of "offline calibration" is occurring, which may or may not involve synaptic downscaling, and it is the Dream-Maker's job to discover particular information processing tasks which require calibration. The Dream-Maker searches for such tasks, by presenting the brain with simulations of situations that require those tasks to be performed, and the Dream-Maker is "rewarded" by some measure of the extent to which the simulation of the task requirement resulted in the discovery of some group of neurons which needed to be calibrated.