Hey Nightwatcher,
I have a similar problem that I'm trying to fix. I wouldn't say I'm suffering from insomnia but my sleeping patterns are not too healthy - I go to sleep around 3am and wake up around 12 if I forget to control myself

But I'm working on it lately and trying to regulate it. What I find helpful is actually staying up as long as I normally do and then waking up early in the morning - the next evening I'm going to be tired earlier and thus go to sleep earlier and earlier over time. The key here is to set your alarm clock every single day to make the transition faster and easier and when your body will get used to it it'll become a routine.
Another thing that I found to be
really helpful is using magnesium chloride hexahydrate-based body spray. My friend who suffered from insomnia suggested it and even gave me some to make my own body spray and try it. It's totally safe and healthy to use, it's basically magnesium. And it's very cheap. So what you need to do is buying comestible or lab version of magnesium chloride hexahydrate (it's a white powder) and then you dissolve as much as possible (to create a saturated solution) in warm water. Then you just pour it into an empty spray bottle and spray it on your thighs (or wherever you prefer - can be back or belly too) before going to bed. It will make you calm and help you fall asleep.
As for nightmares my only advice is to meditate and get to know yourself more in depth and learn how to understand and overcome your fears. I found one thought especially comforting - when you know and understand yourself you also understand that you're a part of this universe and you consist of the universe therefore there's nothing that can harm you unless you want to harm yourself, for you are One with everything (your fears included).
I used to have nightmares too, or I would wake up in the middle of the night and see things/beings or just feel like I'm in danger. Now I rarely have that intense nightmares but when I do I just try to understand my fears and overcome them and always analyze it the next day. In the past I used to shield myself, creating energy fields or rune circles around me before going to sleep and it always worked. A good, blessed/programmed dreamcatcher that's being cleansed frequently is a good option as well.
Good luck! :>