I've spent almost my entire life having issues sleeping. When I was in elementary I had a bedtime of 10 but I wouldn't go to sleep until at least midnight if not later. It's been suggested to me that I might not make enough melatonin but that person wasn't a doctor and neither am I so, who knows, could be true, could not.
So usually when I can't sleep it all depends on what I have to do the next day. If I can't sleep and I have to get up at five in the morning, I just try my damndest to calm down, relax, and go to sleep. It usually doesn't work and I lie there, bored, for hours, but nothing else works either.
If I don't have anything to do the next day...I get up. I play video games, watch a movie, read a book, just do what I want to do. I gave up keeping an actual sleep schedule a long time ago because usually I can't go to sleep unless I'm exhuasted anyways so if I don't have to be up and doing something the next day then there's no point torturing myself.