Hi Ed, welcome to the forum. I think there can be several causes for insomnia such as diet, medication, depression, caffeine but it seems to me that many of these things we can do something about.
What is your diet like? If you can remove some of the carbohydrates from your diet you may find the sleepy feelings reduce. I used to want a big nap after lunch when I was eating sandwiches or wraps but now I have salad with meat or cheese (today its avocado) I feel fine afterwards. The reason is that carbs such as bread, especially white bread are turned very quickly into sugar by your body and that makes you sleepy - don't know why actually - but it does.
So if I was you I think I would reduce carbs at least in my evening meal, stop drinking things like coffee, tea, diet coke after about 7pm. Switch off TV and computer at a particular time that you think should be bedtime, have a bath maybe, use a lavender spray on your pillow (bodyshop) and go to bed in a darkened room (don't watch TV or read in bed because that can be stimulating).
Try to stay in bed, don't get up and start watching TV/surfing the internet - if I start to do that I am awake for a couple of hours.
It sounds like you have got into this late night habit, so you have to make some changes to break it, and stick with it for quite a few days, habits are hard to break.
Good luck, Jane