Sleep, reset and brain wash
While you are sleeping, your brain performs a reset of sorts. Synaptic weights that increased over the course of the day decrease while you are sleeping. At the same time, the fluid your brain floats in, rushes through your brain tissue, clearing out wastes that couldn’t be removed over the course of the day.
Here’s a video and an article about how wastes are cleared away during your sleep.
Here’s an article on the link between synapse size and synaptic weight—the strength of the signal that comes from a given synapse.
And here’s an article about how the size of synapses shrink during sleep.