I think about my day, the things I did that could have been done better. Analyze the interactions I had with people through-out the day and try to determine how they may have perceived me. I think about the following day and what I may plan to do.
However; I am unsure if this is what I do when I can't sleep, or if this is what I do that makes me unable to sleep.
If you are more curious on what I do to force myself to sleep, as of late, I pray. Usually, though, I don't pray for myself or others. I pray to God for forgiveness of various things I did during the day that were bad for my character or my neighbor. For, I think, if I come to a blank mind when asking myself what I need forgiveness for, I realize I am losing bearing on becoming a better person. Whether it's bitterness I had when someone cut me off while driving, or inconsiderate actions such as me being that person who cut someone off, or even if it's a sinful action I committed.
Usually when I talk to God, my mind grows quiet and I can fall asleep.
Psalm 127:2
I find this interesting, though I don't fully interpret it.