could be few reasons. but the most common toyota problem is what ur explaining. easiest cure for it is clean the MAF sensor, and the throttle body. if this doesnt make anything better (which it should), then you have to change the idle control valve. worst case scenario will be the idle control, fuel pump, or fuel pump relay. but for sure, cleaning ur MAF and ur throttle will solve ur problem