Hi,
As you have struggled with sleeplessness for years, seeing a doctor is wise. I've experienced insomnia before, and still do on occasions. Waking up during the night is frustrating. Firstly, having a regular bedtime routine is good. This should involve not only getting into your PJ's and brushing your teeth, but also extra things such as turning off technology, packing your bag for the next day, jotting down things that need to be done, and so on. If your mind is racing before bed and you can't stop thinking, writing down your thoughts is helpful. This is like writing in a diary, except that it's more casual, and done purely to help quiet your mind and get thoughts onto paper. Don't worry about the expression, grammar, or the neatness of the handwriting. Just getting your thoughts out is important. You can throw out the piece of paper afterwards.
Going to bed hungry can make it hard to sleep. A pre-bedtime snack can be nice, so long as it doesn't contain caffeine or too much sugar. You could have some fruit, nuts, or a piece of toast, for instance. Also, eating a heavy meal just before bed can give you indigestion and make sleep uncomfortable.
For quality sleep, your room should be completely dark and as noise-free as possible. Make sure you are the right temperature, too. If you are too hot or cold, you will probably wake up in the night. I find having a warm shower before bed can sometimes help me sleep. If you struggle to fall asleep, try rereading bits of an old novel you know well. Reading a new novel before bed can be a trap, as it can be hard to put the book down. On one occasion I actually read until 6am - don't do this! Sometimes I fall asleep listening to my iPod. I have a playlist of more relaxing songs, and I turn the screen brightness to the lowest setting, so that the blue light isn't too bright in the dark.
I recommend telling your GP about your sleeping problems, as this has been fairly long-term for you. Lack of sleep can negatively affect many aspects of your life; it results in fatigue, which can cause reduced productivity and memory function; it can lead to overeating and caffeine-reliance; can cause moodiness and irritability; lower immune system functioning; and it can worsen depression.
My advice for you is to make an appointment with your GP.
Good luck with your sleep,
SM