It coud possibly be a bad O2 sensor, etc. But I'd really look for simple things first. Is there any unmetered air entering the engine?
This could be anything from a crack in the intake hose(behind the MAF), a leaky vaccum line, or leaky intake manifold gasket.
A good test is spraying carb cleaner around these areas and see if the rpms go up slightly. This would indicate a leak and help locate the problem area.