Sometimes when I cannot fall asleep, I start to thank God for all of the things I can think of. The list is full of things taken for granted: being able to eat, breathe, and walk without assistance. Thanking Him for my teeth, eyes, ears, skin, feet, etc. Thanking Him for the house and everything in it, etc. You get the idea.
Some days I can hardly walk because of a hip problem, so I am thankful to be able to walk and drive. Sometimes climbing steps takes me a bit longer than I would like.
So, there I lie in bed, thanking God for lists of ordinary things and if I get through the list and still can't sleep I start to thank Him for the beauty and majesty of his creation. I tell Him how beautiful His flowers are, and the amazing variety of His birds and sea creatures. Eventually after I start listing these things, my mind wanders and I relax all the while seeing those beautiful images and eventually I nod off and then it's morning and time to get up.