I think dreams drive creative impulse for many people myself included. This usually means less caffeine but more sugar and sunlight. Also, I have this hunch that serotonin is tied to day-dreaming and napping. Not 100% on that, but I enjoy an occasional nap and day-dreaming or at night dreams I feel are very provocative for creating.
At the same time, depending on what you're creating, yes, caffeine, sugar and nicotine are definitely handy. I miss smoking sometimes but yeah, cigarettes/cigars, coffee, sugar, Coke, aspirin.
https://www.bu.edu/writingprogram/journal/past-issues/issue-5/mcclenathan/
https://pmc.ncbi.nlm.nih.gov/articles/PMC5598771/