I would check all major wire connections (battery, starter, alt, ect) for corrosion and tight connections. I would check ALL fuses inside and under hood to make sure non is blown but also to make sure they are fully seated and not flopping around. I would also wiggle the ignition key the next time it happens. It sounds to me like something is loose.