It's a common trope in television and movies: doctor cannot figure out the diagnosis for a mysterious disease, doctor engages in another subplot, then - eureka! - the doctor realizes that the patient of the week has lupus. But the idea that daydreaming actually helps people solve problems has never been empirically tested.

Researchers at the University of California, Santa Barbara; the Max Planck Institute; and the University of British Columbia put that idea to the test. In a study published in Psychological Science, they found that, indeed, daydreaming does help people think creatively and solve problems.

The researchers asked participants to complete an "unusual use test". If you have ever done the Brick Test, you know what this is. Popularized by Malcolm Gladwell's 2008 bestseller Outliers, the test challenges people to think of as many alternative uses of an object that they can find. After completing the unusual use test, researchers had to complete the test again. But, in between the two tests, they were made to do either one of four things: complete a demanding task, where presumably their minds would be occupied with completing it; complete an undemanding task, where ostensibly their minds would have time to wander; have a 12-minute break; or skip the break and return to the test.

The only group that performed better on the second test than they had on the first was that which had completed the undemanding task. Many of the people who performed the undemanding task reported high levels of daydreaming, so researchers believe that daydreaming helped them think creatively.

A study published earlier this year in Psychological Science found that people who daydream the most also tend to have better working memory, and may actually be more intelligent. And a study published this summer found that daydreaming helps thinkers learn from previous experiences and better equipped to cope in the world.

So that's right, daydreamers - dream on.