Some say that a wandering mind is an unhappy mind, and there’s even research suggesting that when we’re not focused, it can make us less productive or depressed. After all, we need to be attentive to the task at hand, right?

Maybe not always. Research is painting a sharper picture of what happens when our minds wander, and it’s showing that daydreaming may make us happier and more creative if we do it the right way.

Yes, there’s actually a right and a wrong way to mind-wander.

There’s a stark difference between depressive rumination — like replaying an ongoing disagreement with our spouse on a loop — and pleasant daydreaming, or letting our minds drift freely.

A 2021 study suggests that the good kind of mind-wandering is more free-moving, like when you daydream about a future vacation in Italy, then wonder whether you needed a new bathing suit, then fantasize about an old flame.

In the study, participants were prompted randomly over three days to report if they were feeling positive or negative, and how much their thoughts were free-moving or related to what they were doing at that moment.

Researchers found that when people’s thoughts were off-task, they generally felt more negative. But if their thoughts were off task and free-moving, it had the opposite effect, making people feel happier.

Of course, mind-wandering is problematic when focus is essential, like if you’re driving or performing surgery.

But if you let your mind wander when you’re doing mundane tasks that don’t require focus — knitting or shelling peas, for example — it can help you feel content.

Science suggests it may also help you come up with creative ideas.

Anecdotally, mind-wandering has been associated with creativity for centuries. A study published this year by the University of Calgary’s Julia Kam and her colleagues suggests the link between mind-wandering and creativity depends on which kind of mind-wandering you do.

In the study, researchers monitored the brains of participants doing a mundane, repetitive task and interrupted them occasionally to see what they were thinking about.

Some participants reported thoughts that Kam calls “constrained,” involving such things as thinking about how to manage a work problem. While these thoughts were not related to the task at hand, they were still somewhat focused.

Others reported thoughts that were “freely moving.”

When Kam and her colleagues matched people’s thoughts to their brain activity, they found distinct patterns for different types of mind-wandering. In particular, freely moving thoughts were associated with increased alpha waves in the brain’s frontal cortex, which is associated with performing better on creative tasks.

When our brains are generating ideas, it’s helpful to drift in many directions and not be constrained, which freely moving thought allows.

“If a problem has built up in your mind and you need to find a solution, letting it go into the background for a bit probably helps,” Kam said. “Mind-wandering facilitates the kind of solution that just comes to you, as in a lightbulb moment.”

This builds on a 2015 study conducted by Claire Zedelius, formerly of the University of California at Santa Barbara. She looked at how mind-wandering affected people’s performance in a word game that measures creativity. Participants were given three seemingly unrelated words, such as “fish, fast, spicy,” and asked to come up with a word that fits with all three, such as “food.”

People who mind-wandered performed better on this task, with the answer coming to them in a flash rather than through methodically testing different solutions.

“People don’t even know how they got to the solution — it was just suddenly there,” Zedelius said. “Mind-wandering helps with ‘aha’ types of problem-solving.”

In a more recent study, Zedelius looked at the contents of people’s thoughts to see how that related to everyday creativity. Participants, including some creative writers, were prompted throughout the day to report on their thoughts and, at the end of the day, how creative they had been.

Findings showed that people’s minds often wandered to fairly mundane things — like planning for a shopping trip — and that these thoughts had no effect on creativity.

But when people’s minds wandered in more fantastical ways — such as playing out implausible fantasies or bizarre, funny scenarios, for example — or in ways that seemed particularly meaningful to them, they tended to have more creative ideas and feel more inspired at the end of the day.

“Writers probably do this for their creative process all the time — thinking through stories, considering ‘what ifs’ or unrealistic or bizarre scenarios,” Zedelius said. “But lay people will also do this more to be more creative.”

This suggests that the link between mind-wandering and creativity has three components: how freely moving your thoughts are, the content of your thoughts and your ability to be removed from everyday concerns.

Still, daydreaming doesn’t always make us happy or creative. If we rehash past mistakes or replay social flubs during a mind-wandering session, or if mind-wandering keeps us from fulfilling our goals, we could become depressed.

On the flip side, a 2013 study found that when people believed their wandering thoughts to be more interesting, their moods improved while mind-wandering. Other studies have found that thinking about people you love or thinking more about your potential future than about what happened in the past produces positive results.

There is even some evidence that mind-wandering may keep depression at bay.

Even though daydreaming may be good for us, Americans tend to pride themselves on their strong work ethic — often translated as working hard for long hours with complete focus.

But people are not built to be “on” all of the time. Taking a mind-wandering break might be good not just for our creativity and happiness, but also for our productivity, especially if we are in jobs requiring focused attention that is draining to maintain.

As long as it’s employed during times when complete focus isn’t required, it may improve our well-being without hampering performance.

We shouldn’t need an excuse to mind-wander, given that it’s part of our human inheritance. Besides, we’ve hardly begun to recognize what it can do for us, Zedelius said.

“My hope is that people will explore the limits of mind-wandering a bit more and try to mind-wander in a way that is bigger, more fantastical, more personally meaningful, and further into the future,” she said. “If people just really allowed themselves to playfully use this tool, they might be able to focus on creative solutions to big problems.”

A version of this piece was originally published in Greater Good Magazine, published by the Greater Good Science Center at UC-Berkeley. It has been adapted, with permission, for the Inspired Life blog.

Have a story for Inspired Life? Here’s how to submit.