It all boils down to getting in a playful and relaxed frame of mind.
You have to get in a atmosphere where you're in a cocoon of your own. You close your door, or you go and sit in the park. And after twenty minutes the mind starts to calm down. Then you start thinking about the subject, play with the thought and you get little ideas start popping up. The main thing is just to be quiet and not to be interrupted. It's being quiet enough to listen to the promptings of your unconscious.
An explanation by John Cleese during a College Tour interview about the source of creativity. Whoever we are, we need free time and a free mind to be creative.