It could be many things. It could be a weak fuel pump, loss of spark. The problem is since it starts right back up, it makes it hard to check which is missing, spark or fuel. I hate to say it, but you will most likely not find the problem until it doesn't restart. At that point, you need to check for spark and fuel. One will most likely be missing. From there you need check the affected system (ignition or fuel). I wish I had a better answer, but because of how it is restarting, anything I say would be a guess.