try taking a small nap when your really tired and feeling like it is hard to stay awake.
When you get up and start using the computer you place too many items going on in your mind hince keeping you awake.
Try listening to some waterfall type music softly. I know it may not be your favorite...