first guess is idle air bypass valve, second guess is a bad/dirty MAF sensor. i'd say its probably the first choice though.
the idle air bypass valve is bad on my car, just haven't replaced it yet. its only a $35 part and not to diff. to replace.
symptom would be as you describe. mine doesn't do it all the time, only usually after driving at a steady rpm for a good amount of time.