I've read that they should be replaced every 3-5 months. (But if while you are working out, you start to wonder whether you should replace them, it might be time.)
Following recommendations to not wear the same shoes ever day, I always buy at least two pairs, and alternate wearing them, so the cushioning materials has a chance to recover between wearings, and they get to air out (it's good to do this with both exercise shoes and regular shoes). Because of this, I replace mine every 6-10 months instead, since they theoretically last twice as long (but are worn the same amount of time).