With cognitive behavioral therapy, people talk with a therapist to identify the negative thoughts and feelings that cause them problems, and to learn ways to solve their problems, according to the U.S. National Institute of Mental Health.

Past studies have found cognitive behavioral therapy for insomnia can improve sleep. But, many of those studies didn't include people with psychiatric and medical conditions.

For the new study, researchers from Rush University Medical Center in Chicago looked at 37 previous studies. The research included nearly 2,200 people and looked at cognitive behavioral therapy for insomnia in people who had depression, alcoholism and post-traumatic stress disorder and/or with medical conditions such as cancer, chronic pain and fibromyalgia.

The new analysis showed that cognitive behavioral therapy for insomnia reduced insomnia symptoms and sleep disturbances. Twice as many people who received the therapy no longer had insomnia, compared to people who didn't have the therapy, the researchers said.

Cognitive behavioral therapy was also associated with positive effects on co-existing psychiatric and medical conditions, but it showed the strongest benefit with psychiatric disorders.

This may be due to a stronger link between psychiatric disorders and insomnia, the researchers said.

The findings provide support for using talk therapy as a treatment for insomnia in people who have other psychiatric conditions, study author Jason Ong, a behavioral sleep medicine specialist at Rush University Medical Center, and colleagues concluded in a university news release.