So cognitive behavioral therapy is one of the best ways to treat insomnia. It's been shown to improve insomnia much better in the long run than the use of medications. This involves different aspects of cognitive behavioral therapy, which include relaxation techniques, using medication, or relaxation therapy, imagery to help you relax and night and help with sleep onset.
It also uses sleep restriction, which involves taking away time that you're lying awake in bed. For example, if you're sleeping six hours, but you're lying awake in bed for two extra hours and spending eight hours in bed in the hopes of getting more sleep, you are disassociating your bedroom with the feeling of sleepiness. So taking away that time will also induce a little bit of sleep deprivation, which will help you get a more consolidated, deeper sleep.
There's also stimulus control, which involves taking away doing any other activity besides sleep away from your bedroom. You know, you're not supposed to be lying awake and reading in bed or watching TV because you start to disassociate your bedroom with the feeling of sleepiness.
So cognitive behavioral therapy can help with reduce insomnia, but people need to be receptive to these ideas and therapies.