In my experience, usually reboots are caused by faulty hardware or faulty software drivers. Bad code generally does not cause a reboot, unless its in windows (drivers) and then you get a blue screen of death.

You might like to turn off automatically restart on system failure as well (or check your event logs after the reboot) to see if Windows bluescreened or just plain rebooted. (Right-click my computer -> properties -> advanced system settings -> startup and recovery -> settings -> uncheck automatically restart).

Somethings to check:

1) Motherboard firmware - I like to get the most recent even if the release notes do not have a fix for my issue.

2) Motherboard chipset drivers.

3) Nivida GFX drivers.

4) Sound drivers - weird I know, but you might like to disable sound while you are playing a game and see if you still get reboots (this links back to dodgy mobo firmware / drivers).

5) Check your mobo manufacturer's forums for others with similar complaints.

Hope that helps and good luck!