How about sleeping through the night? A different function with different math.
My model is caffeine is well-known for having a half-life, from three to six hours depending. That means a geometric fall in effective caffeine in your system after you go to sleep (you don't continue ingesting caffeine in your sleep do you? Sleep-brewing?)
What is the function for 'tired enough'? That is, how does 'sleepiness' decline over the sleep period? Because, when the functions cross (sleepiness drops below the caffeine line) then Awake! That's often about 3AM for me.
If the sleepiness function is a different time-constant, or is more nearly linear (as I suspect, as long as you get enough cobbled-together hours of sleep you are functional which sounds like a simple unweighted sum) then inevitably sleepiness will fall faster (cross the caffeine-left-in-system curve).
At that point you can get up, knock around doing whatever, getting sleepier again. Once caffeine drops below your remaining sleepiness you can get a few more winks.
And wake up shortly after, another hour or half-hour, whatever. Repeat the rest of the night in ever-shorter cycles as your curves both approach the x-axis.
Anyway it describes my sleep behavior nearly perfectly.