One of my daughters recently bought a guitar and began lessons. We were looking at guitar and other music-related books one evening, and found this quote in The Complete Idiot’s Guide to the Art of Songwriting:
Carole King once told me that she would sit down at the piano first thing every morning and just play whatever melodies came to her for as much time as she could reasonably devote each day. I took this advice to heart and tried it, and after a couple mornings I found I was waking up with melodies and lyric ideas. Apparently our minds and bodies get ready for what we expect them to do.
Same with writing.