If I find myself unable to sleep, I get up and do stuff until I'm too tired to keep my eyes open. Watch YouTube videos, play a video game for a bit, take a walk, maybe a few push-ups, things like that. No point in wasting time laying there when I can spend the time doing something.