I had the same problem about three weeks ago, while coming back from work in 95° weather. Suddenly lost all power and had to coast to the side of the road.
No lights, no gauges, no nothing electrical! After 20 secs. or so the gauges came back to life, she started right back up, and was able to do another mile and a half when it happened all over again.
This time when the juice came back the clock was blinking 12:00 like I had disconnected the leads from the battery.
Rather awful experience but a cheap fix. I read on this, as well as other forums to replace the main circuit breaker with an inline fuse. My parts totaled $ 35 and I now have a 40 amp glass inline fuse, and no more problems.
There was a recall for this issue but according to the dealer it was already done on my bike. Apparently it didn't help much.
I was going to put a link to the the other topic and the recall, as well as a picture of my fix, but as a newb I am not allowed to do so, sorry.
Good Luck
Pim