I have had this happen on the freeway a few times, as well as coming up to a stop. It's usually after cruising with the cruise control on and then disengaging it. The only codes I ever got were related to the MAP sensor - replaced it - has stalled a couple times since. Seems to happen more when it's cold but over the last for years it has happened maybe a dozen times total. A couple times it restarted itself, others I have had to manually do it. At speed on the freeway you can throw it in neutral and turn the key without having to pull over (assuming it then restarts...). I tried the jiggle-the-key thing to make it happen (if it's a bad switch) and that is not my problem.

I too am considering the TPS and EGR sensors.