I have a theory that it’s also related to heat. Try drinking a pot of coffee in a hot tub if you can find one, set to a high temp. It’s quite the creative experience.
Maybe some of us need that kind of stimulation just to feel fully awake. I'm a generally lethargic person, and in that state I can't really think clearly. A little shock to the central (or sympathetic?) nervous system helps counteract that and get the ideas or work flowing.