"[T]he sleeping brain is freed of constraints and can create whole sequences of free associations." #readingToday
It seems clear that the sleeping brain is somehow freed of constraints and can thus create whole sequences of free associations. This is not only useful for creativity, it is also thought to facilitate insight and problem solving. It may even be critical for the integration of newly acquired memories with more remote ones (see chapter 8). In fact, this facilitated lateral thinking could, in itself, be the true purpose of dreams. It is certainly valuable enough to have evolved through natural selection.
(Moon+ Reader Pro v2.3.3, The Secret World of Sleep: The Surprising Science of the Mind at Rest (MacSci))