I've noticed that I'm in a much more irrational frame of mind -- prone to bizarre phobias and flights of fancy -- when going to sleep, or when I've just woken up. For example, when I wake up in the middle of the night and go to the bathroom, sometimes I'm terrified to look in the mirror because I'm afraid my reflection will either not be there or do something I didn't. Completely silly of course, and I don't usually feel that way during the day, but it still freaks me out.
I remember Carl Sagan wrote that, in dreams, we're essentially living in the emotional, "animal" part of our brain (the limbic system), and the part responsible for logic and rational thought (the prefrontal cortex) is more or less shut down. If that's true, I wonder if maybe it takes the rational parts a little while to come back online after you wake up.