Sleep: total and regularity both matter
Consistency matters as much as duration. Going to bed and waking at wildly different times leaves you less alert during the day even when total sleep is adequate. Sleep cycles through light, deep and REM stages, and waking near the end of a cycle tends to feel better than waking mid-cycle. When setting a sleep rhythm, start with your wake-up time. You cannot choose when you fall asleep, but you can choose when you get up, and once that is steady, evening drowsiness settles too. The sleep article covers the details.