The only thing that comes to mind is maybe the alternator is going bad....I've had that happen to me with a friend's car. I was the one driving and the lights would flicker on and off,....I was lucky to get home before the car died......once I changed out the alternator the car was fine.......but your case sounds a little different because the car just kept starting back up???
I'm sure one of the other folks will chime in to help you out.
Good luck with that! Keep us posted!