Obviously if you want to sleep well, it's good to stay off your computer or phone or tablet right before bed and get those eyes adjusted to the dark!
However, there are some other things you may be doing at night that could be preventing you from getting that coveted good sleep.
Obviously even if you had coffee at dinnertime, your body is still alert from that caffeine! I've noticed that that also is true for any sort of drink with caffeine - so try to minimize any caffeinated drinks in the evening!
Say goodbye to sleep aids
If you've gotten in the habit of "needing" sleeping pills to get to sleep, you may have built up a tolerance to them. So they probably have stopped being effective so you're wasting your money!
No exercise at night
If you work out after work (like me) or late at night, your body may still be high on endorphins and ready to go hard, not go to bed. Try to avoid intense work outs at least three hours before you go to bed!