You may have read my post on the fluctuating idle. My fluctuating idle was exactly what you are describing.
My problem was a vacum leak - at the intake manifold - which is quite an unusual place for a vacum leak.
A vacum leak (anywhere in the system) is "false air", and prevents your mass air meter from figuring out the proper air / fuel mixture. The idle will hunt up and down, trying to find the right mixture, and can't because of the vacum leak, and keeps hunting.
If you don't have a vacum leak, then your mass air meter may simply be defective.
Additionaly, a defective throttle actuator will exhibit similar symptoms. The throttle actuators have pentiometers that go bad over time. They also have a wiring harness that goes bad - just like the engine wiring harnesses that fail in all M104 engines from 1993-1995.
At any rate, there are too many variables: take it to the dealer or an independent mechanic that specializes in Mercedes Benz vehicles.
2001 E430, Bourdeaux Red, Oyster interior.
1973 280SE 4.5, 170,000 miles. 568 Signal Red, Black MB Tex. "The Red Baron".