John, Just a thought, It might not be electrical. Had mine cut out once in very heavy rain. What can happen is the breather tube from the tank gets clogged with water and road grime and the engine gets starved of petrol and cuts out. The easy cure is to cut the bottom of the breather tube at +-45 degrees, this stops it getting clogged. As a side note if this happens again try unscrewing the petrol cap a couple of turns, let some air in, screw it back in and try starting it.
We get rained on a LOT in Scotland and apart from that one time I've never had any issues with the bike in the wet. As you stated, after a few minutes your bike started up again,its unlikely the electrics would have dried out in such a short time, but it could have been long enough to let some air get to the tank.