There are some investigations that prove that sleeping stimulates creativity and increases inteligence.

A National Geographic article explains us that there is a recent study which proves that a person who sleeps with the REM phase is more creativity than other, acording to the head of the study, Sara Mednick.

In the experiment there were three groups of people: the first group slept and arrived to the REM phase, the second group slept but not arriving to the REM phase, and the last group of people didn’t sleep, they only rested. So this people who arrived to the REM phase got better results than the others in the analog problem answers.