Hi Peach8,
I really feel for you. I've had many episodes of insomnia since being perimenopausal. It's a common symptom of hormone deficiency.
Pre HRT I tried melatonin, taurine, glycine, magnesium glycinate, lavender & valerian tea, meditation/yoga nidra. These all helped to some level, some nights better than others. Once I started HRT and my dose was optimal, I slept so much better but once my HRT dose wasn't correct again, my sleep would suffer again. Which is where I am now unfortunately.
What I try and do now is not worry about it. What I find can help is going out in the daylight in the morning for at least 30 mins every day to help set the body clock and melatonin on/off setting. I go to bed really early, so I don't feel the pressure of 'needing' to get to sleep. I mean early like 7pm. Make sure as much light is shut out of the bedroom as possible. I turn my electric clock light off, so I can't see the time and nor clock watch too. I take my supplements (as listed above), I relax my body down with yoga nidra or something similar (lots of free videos on YouTube or free meditation apps). Then if I find sleep isn't coming as soon as it normally would, I simply feign sleep. I get as heavy and relaxed in my body as possible and keep my mind clear or just focus on my breath entering/leaving my body. This allows the body to get as close to sleep as possible. I find I can cope the next day with this, rather than fretting and getting up through the night, which makes me feel beaten up the next day.
Hope there's something there that may help. x