I would suspect a problem with the idle control system. The system resets itself if it can't achieve desired idle speed. Look for vacuum leaks and be sure the throttle is fully closing. If there are reasons for a high idle the valve will be commanded closed. It may actually control the speed at times, but at others it won't and when the system resets the speed surges.
Bosch Master, ASE Master, L1
33 years MB technician