Did the same thing last night and woke up with headache too :/
What does only getting 5 hours sleep have to do with it? I only slept 3 hours friday night and I haven't been to sleep since. My head doesn't hurt. I am a bit delerious though, but still not tired.
Maybe it's the hat.