Sounds typical of an intermittent vacuum leak. The Engine Computer is trying to lower the resulting high idle speed, then when it does come down on its own, the automatic idle speed motor / valve is set too low and the computer has to quickly open the valve to get the engine speed back up to where it should be. Then, when the vacuum leak shows up again, idle speed goes up too high until the computer kicks in and tries to bring it back down.
Intermittent vacuum leaks are typically caused by flexing vacuum hoses. Leaking gaskets are more permanent and steady.
If a leak isn't obvious, you'll need a scanner that can display live data to see what the computer is seeing and basing its decisions on.