I find that it comes from many places. Vodsel's Picasso quote is great, but I have had flashes of inspiration on my bicycle plenty of times. I think the place that advice applies the most universally is that you should always be working on your artistic ideas... They are part of you, tied in to everything you do. So as you walk down the street looking at things you're viewing them in an artistic context. You're seeing not just a fireplug but a shape with a dynamic and descriptive pattern of light and shade wrapped around it; you're seeing a possible new approach to drawing a cylindrical object (which you promptly lay down in your sketchbook). So as you are cruising along on your bike, steadily exerting yourself for a while, as your adrenaline hits a certain level your head clears and you start seeing the bigger picture and making the broader connections. This thinking applies at least partially to your creative ideas... So you may be riding your bike and just have a great idea for a novel project. Bam, outta nowhere. Except that it isn't- by having an artistic approach to life, you set yourself up to have that great moment of inspiration. You worked for it.
One thing I've done many times is finish a piece of art, then on a planned day in a controlled setting have an LSD or mushroom session with it. (DMT seems to be too fast-acting to be useful for this, although I haven't tried an oral spice session with an art piece yet). During these sessions I may actually get up and add some paint here and there- I've had a few technical breakthroughs in this manner. Often I'll be able to look "through" the piece into the larger vision that its trying to convey, then I'll see a way of advancing a step or two closer to this vision with a new art project. So again, this isn't a vision blasting out of nowhere, it's a thing that has been set up with work, intention, and more work. But some of these flashes have been unreal, very much worth the price .