When I wake up in the night and worry about things I cannot control (sounds like I do this more occasionally than you do), I have a series of scripted kinds of thought patterns that will usually work--like going over character relationships in a favorite work of fiction, or retelling a recently re-read or re-watched thing, or sometimes playing alphabet games (such as taking two people in a couple and try and think of the name of a famous person or a person I know with the first initial of one and the last initial of the other).
This works about 90% of the time, while "counting sheep" or its ilk is useless because too simple.
no subject
This works about 90% of the time, while "counting sheep" or its ilk is useless because too simple.