Electrical gremlins

So I'm riding to uni one morning. Electrical death. But restart while coasting and off I go. 30 minutes later happens again. No warning, just death. This time the electricals don't come back for a few seconds and have to pull off the road. Then on the way home she dies again. This time the electricals don't come back (as in absolutely nothing) and have to call a tow. Now I go down stairs and she is right as rain again. checked the battery connectors, look fine. Fuses look fine. My expertise of electricals is nil. Suggestions? Don't think I wanna ride her again til I know it's not gonna cost me another tow. This is gonna cost me a fortune in car petrol 
