Years ago, I read an interesting article about the Hopi and their music. Music, historically and universally has had a close connection to the religion of the culture in which it exists. This was true among the Hopi. The medicine man was often also the tribe composer/lead musician, and a spiritual leader. He would meditate and songs would come to him in his meditation. The Hopi belief, according to this article, was that all songs and music already exists, and through meditation they are revealed to us. The composer is in effect, not composing, just relaying what already exists to others.
What an interesting idea!
While out walking, I have had a musical phrase "pop" in to my head when I was least expecting it. I am not the only one who has found inspiration while walking. Beethoven took longs walks, in the woods, and one result of those walks was his creation of the Pastoral Symphony, his most programatic symphony.
I have also received ideas just before falling asleep, or (sorry Pastors) during a sermon. I find I do have to write my idea down as soon as I can, because just as it came to me quickly out of nowhere, it will disappear with the same speed!
Improvisation is another way to find inspiration. As an organist, I need to "fill time" while providing background music for communion, etc. I open a hymnal and play a hymn with orginal improvisational interludes or variations on the hymn tunes. Many of my published organ pieces came out of this process.
With young students, who, just because of their age, have less experience with music, I have had them use a Classical composer's piece as a springboard to writing their own piece. For instance, while learning Eflin Dance by Grieg, the student and I discuss what makes the piece sound "Elfinish." We then experiment with sounds (key, melody, rhythm, articulation, dynamics) write a few ideas down, and their assignment is to chose the idea they like best, and experiment with what should come next.
One of the pitfalls in working with the young student is the tendency they have to find new ideas by only playing them on the keyboard. Because most young students tend to think within the five finger range of their hands, if they are allowed to try to get ideas just by playing on the piano, the ideas tend to be limited and frankly, monotonous. If that is happening, I will play what they have written down so far, then say "what do you hear coming next?" WITHOUT letting them touch the instrument. Often they will sing something to me that is much more interesting than if I had let them try just playing their idea. After we decide that is the best idea, then we write the idea down, and the process continues.
Inspiration can come in a variety of ways, and at surprising times. We need to be ready when it does come! Stuck? Try the Hopi way!