Restrict your sleep
Insomnia is treated by sleep restriction, which is behavioral therapy. It works by reducing the amount of time you spend in bed in order to increase your sleep efficiency. Consider what would happen if you stayed up all night and only got two hours of sleep the next night. You'd most likely be exhausted, and that time would be spent sleeping deeply.
Sleep restriction helps train your brain to be asleep rather than nervous and awake when you're in bed by reducing the amount of time you spend awake in bed. You may feel more tired than normal in the early days of the process since it limits your overall time for potential sleep. Gradually, you'll be able to increase the amount of time you spend in bed each night while also improving your sleepiness levels.