I had suffered from insomnia for almost 25 years.
You need to start a night-time routine and stick to it.
First and foremost, your bed is ONLY for sleeping and sex. NOT for work, computer time, watching TV, even reading.
Your body will associate getting into it with sleep and actually alter its chemistry to prepare the body for sleep.
If you get in for sleep and you find yourself unable to sleep after about half a hour, GET OUT. Go into another room and do something like read a book or work a puzzle. Try to go to sleep again after a bit.
I cannot stress how important exercise is to sleep problems. I really can't. A ten minute walk, even.
Spend at least 10 minutes of every day outdoors. NO matter how shite the weather. Exposure to natural daylight actually helps the brain's circandian rhythm.
If you smoke, you need to stop, sorry, but it can interfere with sleep.
Ditto alcohol consumption in the evening before bed.
If you must eat before bed, try a teaspoon or so of roast chicken.
You really need to change your diet, too.
And if you take ADs, they may be affecting you, so discuss it with your GP.
I'm having a bad jag just now because I had a bad bought of sinusitis and am pregnant. Not being able to breathe well out of my nose, especially whilst llying down, makes me very anxious and when I do finally fall asleep, I wake up wiht a panic attack.
But I know it will pass!