One of the most important things you can do is wash them ASAP after a sweaty ride.
And if not, at least hang them inside out so they dry out. I find the only time I notice bike clothes becoming malodorous is when I take them off and throw them in the hamper. So now I hang them in a ventilated place when I'm done riding and haven't had any problems. I've yet to figure out how to keep gloves from stinking though.