Auto restart tends to be because of a system error… you can tell it not to restart in future or leave it but ether way the computer should be writing an error report to the events log that can help track the problem down.
p.s. xp only has two days remaining before Microsoft turns the lights out so this might also just be karma knocking to say it's time to upgrade.