One of the problems with insomnia as a construct is that it lumps a bunch of problems together that probably don't have the same mechanisms. The vast majority of insomnia treatment and advice is focused on "initial insomnia", i.e. inability to fall asleep when you first go to bed.