I had that problem once. Do you have a fan in the side of the case you were putting back on?
I finally found that the connector to the fan in the case side was slightly loose. It would cause a spike/disturbance when bumped and cause the system to reboot, usually with a chkdisk (sometimes not) running. Making sure all connections were tight stopped the behaviour.
This always happened when I was going into or replacing the side of the case with the power on.