You have a bad coil. When it heats up there is no fire. When it sits for a while and cools......it will work again until it gets hot.Have a John Deere JS38 push mower.
Purchased in 2012 and has worked great.
Sometimes bag grass, and stop engine to empty clippings.
Never had problems with it re-starting until end of last season.
When I stop it to empty clippings, it will not start unless I leave it sit for approx 15 minutes ... as if it's flooded.
Oil was changed every year, and occasional changing of spark plug with most recent last year.
Appreciate some advice or something to check.