The guys are right, it is most likely a vacuum leak.
However, on my 94 E200 with the same basic engine as you (M111) I had the same fault. I finally traced it down to the water temperature sensor (my car has 2 sensors, 1 for the gauge and 1 for the injection electronics. It was the injection one). I had a poor connection here and could make the revs rise and fall by wiggling the wires attaching to the sensor. Sadly, I wiggled mine once too often and the sensor broke.
Once I fitted the new unit, 100% OK.
E200 Wagon 1994 110k miles.