The best thing I have found for getting to sleep and getting back to sleep when I wake up THINKING - is to listen to a good audiobook read by a good reader.
I put all the chapters/episodes on a playlist and remove the chapters I have heard all of as I go.
I leave it playing all night. In the morning, remove heard chapters, mark the whole playlist unread, start the next episode and go to where I don't remember it. All ready for next night.