I believe it means that his hat has pressed all his hair down, so that his head looks funny.
What do I do about ‘hat head’?
Assemble the following items shampoo, water, duct tape and a vacuum cleaner... Just kidding! Hat head is a fact of life in the world of hats. Sometimes you can arrange your hair so it can be fluffed up when you take the hat off. Everyone