Hot decaffeinated tea can be relaxing at night. My preference is Hyssop herb tea.
Sometimes, when my body is fatigued but my mind is still whirling, I have to roll over, turn on the light, and write down my thoughts to get them out of my head. Once the light goes back off, sleep usually comes.
Other times, when there are not necessarily any thoughts or any other random reasons for sleeplessness; I ask God what it is that He wants to share with me. I get quiet and wait......then, He shares some really awesome revelations, wisdom, encouragement, and/or promises that I find myself rolling over, turning on the lights, and writing down. Having done so, sleeplessness disappears and the next thing I know it's morning.