A sticking EGR valve will act like that. Fine one day, acts up the next, gradually will get worse. As Darin mentions, tapping on the EGR when the idle is rough is a good test, that can loosen the EGR valve to let it close. A gun cleaning kit is a good tool for cleaning the EGR if needed. Small wire brushes and gun cleaning solvent work well to remove the buildup inside.