Not much help... I had something similar though.... I have a 96 Prelude S, mine did that last night. I had my car over at a friends house and we were looking at putting in some driving lights. Hood was up for about 2-3 hours... but we didn't touch anything. Mostly just measured and fitted things outside the engine compartment.
When I left it was reving between 1-2k rpms. I let it do that for about 5 times then backed out like normal... and pulled up to the nearest stop sign and stopped. It stopped and didn't idle funny. I attributed it to it being cold. Thats the first time I had it happen. It was rainy and cold last night. Other than that, it never happened.