My brother--who is much wiser than I am--has a foolproof method to help you get back to sleep on those nights when you wake-up and are just flipping and flopping or staring at the ceiling.
When he can't sleep, he thinks of a topic and then in his mind lists an answer for every letter of the alphabet. For instance, street names for every letter in the alphabet. Baseball players is another endless angle. Or first names that end in "a".
An advanced topic is thinking of e.g. animals that have two consecutive letters the same, like "rabbit" or "blow-adder".
In his mind, the ultimate boring challenge that gets him to sleep every time, is
listing rivers for every letter of the alphabet.
Have a good sleep!