Maybe due to stress. Going on your TV, computer, or phone before bed will make it difficult to sleep because the lighted background tricks your brain into thinking its day. If you are inactive during the day, you won't sleep as well, but don't exercise before bed. Here i can suggest some tips that you should to be follow once. Stay away from eating chocolate before bed. Try reading a boring book, drink warm milk before you go to bed. I hope this will work for you.
This might help :)
http://insomnia3000.com/5-simple-ways-to-sleep-longer-and-get-better-rest/
There's many things you can do besides take drugs to help yourself sleep better. Ask your doc about using a CBT adult sleep training program, which will give you a comprehensive solution.