I was thinking EGR valve too but I believe it is supposed to be open when accelerating. This might be something as simple a a fuel filter. Next time it does this try removing the gas cap. See if there is a vacuum there. A clogged fuel tank vent can create a vacuum and starve the engine for fuel.