Hi, welcome to the forum. I also get bad anxiety and bouts of insomnia.
My insomnia and anxiety are related. Elevated cortisol levels due to stress cause me to have insomnia. I've been trying to meditate every night to bring my stress levels down - thus bringing down my cortisol levels - thus helping me sleep better.