In many parts of the nervous system, experience-dependent refinement of neuronal circuits predominantly involves synapse elimination. The role of sleep in this process remains unknown. We investigated the role of sleep in experience-dependent dendritic spine elimination of layer 5 pyramidal neurons in the visual (V1) and frontal association cortex (FrA) of 1-month-old mice. We found that monocular deprivation (MD) or auditory-cued fear conditioning (FC) caused rapid spine elimination in V1 or FrA, respectively. MD- or FC-induced spine elimination was significantly reduced after total sleep or REM sleep deprivation. Total sleep or REM sleep deprivation also prevented MD- and FC-induced reduction of neuronal activity in response to visual or conditioned auditory stimuli. Furthermore, dendritic calcium spikes increased substantially during REM sleep, and the blockade of these calcium spikes prevented MD- and FC-induced spine elimination. These findings reveal an important role of REM sleep in experience-dependent synapse elimination and neuronal activity reduction.