This may seem like an ad, but it's not. Try one of the sleep monitoring software. I, for example, am using Sleep Cycle (an iPhone app). It measures, how long do I sleep, how deep I am asleep and it wakes me when I am the light sleep phase (30 minutes window I set the night before, for example, 5:30 - 6:00).
Also, sleeping 7-8 hours is a myth in my opinion (I have no research to back me up, it's my sole observation). I feel rested when I sleep for around 6 hours, my grandmother had the same. My wife, on the other hand, feels great after 8-9 hours. Everyone's different and needs more or less rest. Plus, it all depends on what you are doing during the day. Sometimes I run all day and am not tired at all, the other day – I sit behind a desk with some mundane tasks and fall like a log.
Last but not least, try to keep cool temperature in your bedroom and refrain from looking at the screen for at least one hour before going to bed. Displays emits something that is called a "blue light" and it wakes you up. It's harder to sleep and to have deep sleep phases after long exposure to such light. If you find this difficult, try reading a book (relaxing one, something funny, nothing hard).
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.