I soaked mine in a mild bleach and laundry soap solution for 30min. then rinsed them really well and finally kept them in a hot car for a few days (kind of like an autoclave).
The trick is to make sure they get dry really fast after any workout. I just pop them in the car or during winter, up against my forced-air heating duct.
I'm not too sure about how to get rid of the funk, but prevention is definitely easier than cure. I find taking them off immediately after a spin and then putting them somewhere they will dry quickly makes a pretty big difference!
I leave a small box fan running and put both my running shoes and bike shoes in front of it as soon as I get back from the run/ride. That's kept them both stink free for years.
putting the insoles in the dish washer (with no dishes) and run with vinegar is one way to de-stink them.
Seriously, make a bucket of 3 gal water and 3 scoops of Oxy-clean. Take out the insoles and hand wash those. Dunk the shoes well and scrub with a brush. Dry in the sunshine without rinsing.
You can also defunkify gloves and helmets this way.