Within our subconscious mind we retain a primitive mechanism to both remember stress, and control our ability to sleep. When we are in balance we send the appropriate instruction to our subconscious, and the sleep mechanism simply takes over. However when this balance is disturbed the result is sleeplessness.
As you go to sleep and before you implant any thoughts that you want into your subconscious mind it is best that you clear the day that you have just been through. Then next step is to go deeper into relaxation by going to the Theta brain wave state - the meditation or dream state.
Hi, you should stop watching or playing games late into the night. In the initial phases of the sleep cycle and while awakening, we tend to be more conscious or alert. If we study the brain waves at these phases they tend to show the alert wave pattern, this could cause the awareness. If it is not interfering with your sleep schedules you don't have to worry. If it persists or is troublesome consult your doctor for assessment. Regards.