You were looking for:
Cognitive behavioral therapy for insomnia
Chronic insomnia may be caused and/or maintained by (incorrect) thoughts on sleep, negative emotions concerning sleep and lifestyle and sleep behavior. By adapting these thoughts (cognitions) and behavior you can once again get a grip on your sleep. This can break the vicious circle of chronic insomnia. Your own effort and motivation is very important.
Cognitive therapy for insomnia usually takes place in group sessions, sometimes individually. The therapy has been studied extensively and is considered to be the European golden standard for the treatment of chronic insomnia.