A new paper published in Lancet Psychiatry shows that people with perfectionist tendencies have a harder time getting sleep.

Netherlands Institute for Neuroscience researcher Tessa Blanken and her team studied the personality traits and life histories of 2,224 study participants diagnosed with probable insomnia disorder between 2010 and 2016 and traced insomnia to five personality types.

All of these insomnia-prone personalities align with what sleep researchers already know, according to Rafael Pelayo, MD, a sleep specialist at the Stanford Sleep Medicine Center. And it makes sense that people who are prone to depression, high stress, and other negative moods would have trouble sleeping. “People sleep best in states of serenity,” he says. “You sleep best when you feel safe, comfortable, and loved.”

Dr. Pelayo works in Silicon Valley, and he and his colleagues see a lot of software engineers come to the sleep center with complaints of insomnia. Generally, he says, it’s because their brains are unwilling to leave a problem unsolved. “People who are perfectionists or have obsessive-compulsive disorder tend toward insomnia because they try to fix things, and you only fix things by staying awake,” he says. “[Insomnia] can be a thinker’s condition.”

Get the full story at Health.com.