I do that as well, and when I don't do it, i know it's time. :yes:There is a product called Affresh that is made for that purpose, probably other brands as well.
All I do is set the machine for "clean" and use some bleach. That has worked for me for two years now. I have a Maytag HE top-loader. Some of the He front loaders are notorious for having a bad smell over time.