People's moods when they are tired

Why is it that when people are tired and just waking up, they are grumpy; but if you keep them awake for a long time and they are very tired, they get giddy/ loopy?

confirmation bias. I’ve worked a buttload of nights and most people do not become giddy most of the time.