That's happened to me twice. Once 200 miles into a 350 mile ride in a hard rain. The bike restarted when I gave it a little throttle while hitting the start button. Problem disappeared by the time I got home and the bike dried out. It happened again a year or two later after washing it at a car wash. Problem was gone again when I got home. After a lot of looking and pondering I decided it might have been caused by water running down "crank or cam shaft position sensor wire" at the front of the engine. The wire runs into the top of a cover there at the front of the engine just behind the front wheel. I put black electrical sealant around the wire where it goes into the cover and the problem hasn't returned. Doesn't mean that fixed it but I hope it fixed it.