My gf’s 1998 Honda Passport (which is gracefully falling to bits) will occasionally do a variation of this–suddenly, generally while idling in park, the RPMs will jump to about 2,000 and stay there for an indeterminate amount of time. It has been doing this for years and with over 250K on this vehicle and many other issues, it hasn’t been worth the time or effort to troubleshoot. The check engine light does not come on during these episodes, which happen about 1-2x every 3-6 months, usually in warm weather. She is used to this problem and it seems to mostly occur in park so it hasn’t tried to take off on its own. Other than that, it runs beautifully, especially considering the somewhat indifferent maintenance she’s given it over the years. I have been sitting in the passenger seat waiting for her to come back from an errand, with the A/C on, and have experienced this ghostly behavior a couple of times. Once, I shut off the engine and restarted it, and after a few seconds, the idle returned to normal.
So to sum up, I have experienced this with a vehicle, and I don’t think you had your foot on the gas when it occurred. I would also suspect the IAC, but you also may have some sort of intermittent vacuum leak that could be causing the problem. Some of the emission controls use engine vacuum to operate, and they only kick in at certain RPMs and operating conditions. So your engine’s computer decides that it needs to purge the charcoal canister or some other task and activates a solenoid that diverts engine vacuum “pressure” to accomplish this task. There’s a crumbling vacuum line with a crack in it at the other end of the solenoid valve, and when the solenoid valve opens, suddenly more air is being sucked into the engine, increasing the idle before the computer can compensate. Not saying this is necessarily your problem, but this is a possible scenario.