I recently came to the conclusion that running games on the fly was the best way for me to run successful games. I've only run a few sessions since but each one has been a major success for me and the players, proving to me that it was the right decision.
Not everyone can do it, though, and even those who can will find they have off days. IME, the best thing you can do to 'prepare' is the following:
1) Make sure you're refreshed, that you have a clear head, you've eaten before-hand, etc. If you haven't slept, or you're going in hungry or you've got other things on your mind, then running a free-for-all session is the last thing you want to be doing.
2) Know your players and their characters. By knowing your audience, you can far more easily come up with situations and challenges that they'll enjoy and as a DM, your enjoyment is often tied into the player's enjoyment. The more they like your game, the happier you are as a DM and the better your improv and sessions will be.
3) Know the rules well. If you can't come up with a roughly balanced encounter in a few seconds, then improv isn't for you. Knowing the system well helps IMMENSELY with this process. I can pretty much come up with a balanced and exciting 4e encounter without even using monster stat blocks and JUST using page 42 (updated...). That kind of system knowledge only comes either from lots of playing, or lots of DM'ing.
4) Know your setting. Having a really solid idea of what your setting is like and how it should be, whether it's published or your own homebrew, is really important for being able to improv. If you have no idea what the laws of County Whatchamacallit should be, then you're going to end up stammering on the spot and wondering what the heck to do.
5) Just have fun.