That sounds like what I went through a couple months ago on a trip to the mountains. Rode through some pretty heavy rain for a couple of hours with no problems; then I stopped along the Nantahala River to take some pictures when I was getting pretty close to Robbinsville (it had stopped raining). When I got back on, the bike reluctantly started once and then died. Cranked but no start after that, and got a couple of sonic-boom backfires when trying to start it. I walked around and cursed for a while, and kept coming back to try to start it with no luck. I had the AAA card getting ready to make the call, and decided to try one last time. Of course it finally started up, ran rough for a minute, and then ran fine. Rode in heavy rain a few minutes later before getting into Robbinsville and again for awhile the next day with no issues at all.
This winter, I'm planning to go through all the electrical connections and re-grease them. I've never had issues in the rain until that day, and actually haven't had issues since. Several people have had problems in the rain with these bikes, as well as problems after washing bikes too. Good luck with it.
Will