Adam Perkins is a psychologist and a self-proclaimed neurotic, contemplating things to the point of obsession. He can get anxious about things that might seem mundane to another person. And he’s admittedly quite sensitive.

Perkins also has a new theory, described in a piece published Thursday in the journal Trends in Cognitive Sciences, about why he and many others like him channel their neuroticism into creativity and problem solving. He argues it comes from how certain people daydream.

Neuroticism and creative thinking have long been correlated: some of history’s more exciting minds, from Isaac Asimov to Winston Churchill to Woody Allen, have been famously anxious with a tendency to brood. The trait is also often associated with being risk-averse; neurotic people are often considered “threat sensitive,” a classification that the psychologist Jeffrey Gray first pinpointed while developing a test that predicted a person’s tendency to be neurotic. Gray’s test showed that high scorers on the neuroticism test tended to avoid “dangerous” jobs, preferring occupations that kept them out of harm’s way—hence the association with more analytical jobs, which require creative problem solving, as opposed to physical ones.

But Gray’s analysis seemed simplistic, Perkins says. “Why should having a magnified view of threat make you good at coming up with solutions to difficult problems?” he tells TIME. “It doesn’t add up. On one hand, it’s a clever theory—it shows the difficulty of holding down a dangerous job, for example—but on the other hand, it doesn’t explain why [neurotic people] tend to feel unhappy or why they’re more creative.”

Perkins had an epiphany when he attended co-author Jonathan Smallwood’s lecture on mind wandering. Smallwood, an expert who studies the neuroscience of daydreaming, was describing self-generated thought and its origins in the brain’s medial prefrontal cortex, a part of the brain that has been linked with memories and recall.

“He started describing how people whose minds wander are better at things like creativity, delaying gratification and planning. He also talked about the way that daydreamers’ minds wander when they’re feeling kind of blue,” Perkins says. “And my ears perked up.”

Smallwood had run a series of tests on volunteers, where he’d put them through an MRI scanner with no instructions. Naturally, the volunteers began daydreaming. Those with negative thoughts would display greater activity in the medial prefrontal cortex. “If you have a high level of activity in this particular brain area, then your mind wandering tends to be threat-related,” he says.

That’s what happens in the brains of neurotic people when their minds wander.

And of course, no surprise, the longer one dwells on a problem, unwilling to let it go, the more likely they are to come up with a solution—making that a potential upside to neurotic daydreaming.

“There’s costs and benefits to being a neurotic,” Perkins says. “What’s interesting is that you can be neurotic and have a creative benefit, but we still don’t understand it.”

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Tanya Basu at tanya.basu@time.com.