When you sleep, your body gets rid of toxins, etc., it does not need, plus it's easier for the body to fight an infection or something along those lines when you sleep, that's why you hear the line: "Get plenty of rest!"
As for how long to sleep, it's up to you. Some people are night owls, others are early risers and there might even be people inbetween. If you go to sleep at like say 11 pm and wake up at 7 am feeling fresh and awake, then it's enough sleep for you.
The 8-9 rules applies to adults to get "better" sleep, while children require up to 11 or more as their bodies are growing.
Here's something about what happens during sleep from the internet:
Sleep allows the brain and body to slow down and engage in processes of recovery, promoting better physical and mental performance the next day and over the long-term. What happens when you don't sleep is that these fundamental processes are short-circuited, affecting thinking, concentration, energy levels, and mood.
The bottom line is - sleep for as long as you want and when you want, but do not get sleep deprived as it is bad for you and your body. Literally.