Ahh I can really relate to this - I keep forgetting my clothes in the washing machine too. I guess some habits from your student days die hard!
Anyway, I've read about people using baking powder and vinegar and other stuff like that, but my solution is pretty simple.
I just wash the clothes again on a high wash, for as long as possible, with as much detergent and as many of those weird liquid-gel tabs as I can squeeze into the drum. I then leave the clothes outside to air out and catch some sun for a bit, and stick them into a dryer with plenty of Bounce sheets to finish drying,
I'm sure someone with a bit more expertise than me is going to improve on my advice, but this is a method that's worked for me on a number of occasions.
Maybe if your clothes have been lingering in the machine for a while and have developed some serious mould, then more drastic action will be needed.