Restarting the engine seems to reset the sensor.
The transmission won't shift properly. Why?
on 2007 Mercedes-Benz E320 BLUETEC
It sound like your car may be going in to "limp mode" or limp home mode..This happens when the computer senses something is wrong. I had this problem on my E 320 after hard acceleration. Once I switched off the engine and restarted it things were okay again. The problem was the throttle position sensor and cost about 350 to repair.