you could have water in the fuel tank... my dad's boat did the same thing. the water turns to a gel like substance, it gets sucked up into the pickup tube,choking the engine off then returns to the bottom of the tank when the engine cuts off. Its worth a check before any costly repairs.