Hi,
I'm not a technician, but my ML320 was doing this, especially in hot weather. No dealer could find anything wrong, and they were all really trying. There were no codes or anything. A friend suggested that it could be the fuel pump in the GAS TANK,(yes, there is a second one!). The local repair guys replaced it (it's a lot of work), but I have had no problems since, even in 115 degree heat going up hill.
Just a thought.