How does an engine quit? Can it also decide to run decide to run. Or did you mean it stopped running?
“How does an engine quit”
Water in the fuel tanks. A huge gulp of water down the air intake.
Stopped running would be my guess. :>}
Sediment on the bottom of fuel tanks can get stirred up in big seas and can get picked up and enter the fuel line to the engine.
This will plug the fuel filters and stop the engine.
The filters would have to be replaced; the engine primed; and restarted.
On some boats this is a long process.
That is just one of the likely things that can happen.- Tom