congrats on getting it worked out.
random reboots are weird, could be a lot of things..
anything from a loose power connector, to a faulty power supply, to a motherboard with leaky capacitors, to an software fault, or even cpu thermal protection (although if it's idle that most likely was'nt it)
keep an eye on it, once is a fluke if it happens again you know you got a problem.