Mine did the same thing, and it was a bad coil. It would run fine, shut it off, wouldn't want to start. Crank, crank, crank, it would fire up and run fine, then 20 minutes later die while you were driving. The next time you would get in it it would start right up, then the next time it wouldn't start at all.
There are other things it could be, and all of the gearheads on the board will explain them to you in great detail

But my problem fixed by simply putting on a new coil.