Time in the hat is a period of self reflection whilst on a dose of psychedelics. Sometimes meaning literally putting a hat over your eyes and losing yourself.
Alternatively this can also mean you've put in your dues in your job.
EXAMPLE 1: Timmy needs to spend some time in the hat. He's a little selfish.
EXAMPLE 2: Joe used to work at the gas station. He really put in his time in the hat.