When sleep deprived/sick, why do I drag all day, then suddenly feel fine once the sun goes down?

I know people usually say the opposite, that sick symptoms get worse after the sun sets, but it’s always been the opposite for me.

Likewise, when I haven’t slept enough, I feel weak, unfocused, and whiny all day, but once the sun goes down, I feel completely fine.