Work through the fuel system in order, and you will most likely find the cause.
Start with the fuel filter. If it is clogged, replace it, since a starved engine is exactly what produces this symptom. Next suspect the fuel pump: remove it and test it, then replace it if it is failing. While you are in there, clean the mass air sensor with the appropriate spray, as a dirty sensor can upset the mixture enough to stall the car.
Those three, in that sequence, cover the majority of cases where an engine dies and then restarts without complaint.