I'm fighting the same problem on mine, and it surfaced after the water pump was replaced...but it happens regardless of a cold or hot engine.
I have read other related threads that pointed to a faulty shifter switch curing the problem, but I am more inclined to go with Arthur Dalton's inference of a vacuum line coming loose somewhere.
I also swapped out the air mass sensor and temp sensor, and neither did the trick...
2009 ML350 (84K) - Family vehicle
2001 CLK430 Cabriolet (71K) - Wife's car
2005 BMW 645CI (124K) - My daily driver
2012 Mustang V6 (60K) - Daughter's car