People with insomnia are twice as likely to develop depression, compared to those without insomnia, reports Inverse.

Chronic insomnia, meanwhile, may increase a person’s risk for depression. In July, scientists discovered why these two states of being appear to be intrinsically connected: They are bonded by a neural link.

Researchers announced in JAMA Psychiatry that individuals with insomnia and depression experience increased functional activity in regions of the brain associated with short-term memory, a sense of identity, and negative emotions. Functional activity — a term describing when separate parts of the brain are connected by patterns of active neurons — means that there’s a neural basis for the association of depression with poor sleep quality.