What causes my push mower to stop running once it gets hot & then it can restart again once it has cooled off?
I have a push mower that runs for about 5 minutes or until it gets hot & then it just stops running & it wont restart until its sat for about 5-10 minutes then it repeats what i said above. I kinda think its a solenoid problem because it never has a fuel problem while its running. Like sputtering in & out.

That’s a classic coil problem, although, your mower doesn’t have a coil. What it does have is an ignition module.
Next time it dies, check for a spark, I’ll bet it doesn’t have one. Before you go replacing the ignition module, it could just be a bum spark plug, and being as a spark plug is much much cheaper than an ignition module, try replacing that first.
Edit >>> One more cheap thing to check before the module. Check you gas cap for a damaged or missing breather cup. If the cup is damaged or missing then your gas tank is building a vacuum. You could also loosen the cap and see if your mower starts right away.
if its a push mower i dont think it has a solenoid thats for starters on riding mowers but the next time it cuts off find out what is missing usually fuel, air or spark give it a wiff of starting ether if no result pull spark plug wire and ground it 1/4 inch from frame with screw driver to see if you have spark, if ok pull off air cleaner and see if choke is open or air filter is plugged if it runs better without air filter then it is plugged
Head gasket.
It is common for the head gaskets to go and easy to replace them. $5 bucks for a new one. seen it a million times.
A very easy thing to check is the fuel flow. Loosen the gas cap on the tank when you have it running and then find out if it dies again. If it does not, then clean the vents in the gas cap. It’s a cheap, easy check and fix if that’s the problem.
Sounds like it could be a clogged air filter. Remove the filter from the front of the mower, it looks like a sponge. (well, mine does) Blow out the filter with an air hose/air compressor or you can replace it if it is very dirty. I never heard of the other possible solution, to remove the gas cap, but it does sound interesting and possible valid.
If it’s been used allot, check head gasket bolt’s make sure they are tight, if that doesn’t do it it, could be the exhaust valve they get old and blow by can happen, and gets hot. you can try to re-lap the valve, or you might have to buy a new valve and seat. If you re-lap the valve remember to grind the end of the valve steam a little bit too.. or it could be in the carburetor, might need a rebuilt kit, and cleaning, it’s good to empty the gas tank too, if you do this..if the magneto is on firm and not touching the magnet it shouldn’t be a problem, unless it has points. if it has points, replace with new kit.. Hope this helps