The two-process model of sleep regulation
Sleep timing is governed by two interacting systems: a homeostatic sleep pressure that builds up the longer you stay awake, and a circadian process that promotes wakefulness at certain times of day independent of how tired you are. The circadian alerting signal rises through the evening to counteract mounting sleep pressure, which is why you can feel a 'second wind' late at night despite having been awake all day.
