First, do you usually have a tv, computer or other electronic device in your room turned on while you're trying to sleep? I ask because you obviously got online but not sure if you had the computer or mobile device in your room.
This kind of thing - having an electronic device turned on in your sleeping area at bedtime - is always a bad thing. The light is disrupting and even with your eyes closed, the bright light can still cause sleeping problems.
I try to make sure of several things before bed: a comfortable temperature, no electronics on (or else placed so I can't see the screen), lights off and relaxing music - not with vocals but the kind designed to help you relax and sleep.
You can try drinking some chamomile tea if this doesn't help. I also result to a hot bath and just soak for a while because the heat and steam makes me drowsy sometimes.
Too much sugar, too much coffee, too much chocolate or too much stress. Try to drink a cup of chamomile tea with two bags and then wrap up in warm covers and lay still for ten minutes without moving. Good luck & take care! : D