When you sleep too long, you start to create some hibernation like hormones or chemicals in your blood. This may be a throw back that enabled us to to sleep through long winter nights during the process of our evolution.
It's only in, relatively recent times, that artificial light and other factors have made it possible to sleep much less.
At 4 or 5 hours a night, your more likely to make mistakes, have an automobile accident, develop health problems or become overweight.
At about 7 1/2 hours an adult will have peak energy and alertness.
As you point out, at 10 or 12 hours a night you may feel groggy all day.