Award-winning writer and comedian Ricky Gervais writes on his blog:
I don’t mean don’t become an adult with responsibility and the weight of the world on your shoulders. I simply mean if you’re writing or directing give yourself enough time to play. Play the fool. Goad. Shock. Laugh. Trip over something that isn’t there. Try something. And never be afraid to fail. That failure is useful too. It’s just another building block.
Essentially, Gervais makes two points on stimulating creativity: give yourself enough room to play (e.g., do something purely for fun’s sake), and engage in something with a high probability of rejection or failure.
Don’t take yourself too seriously! Once you’re done that work, recharge your juices by playing. Build something goofy. Draw something with your non-dominant hand. Record yourself playing the 20th Century Fox music on an unfamiliar instrument. That sort of thing.