My late-2008 MBP keeps restarting itself
You could try following investigating method using Terminal.

﻿What is shutting down the computer

syslog -k Sender kernel -k Message CSeq 'n Cause: -' | tail | awk '/:/{$4=""; print}' | pbcopy


The output is in the clipboard, so paste it in a text program like Notes or others. You can paste it in here for us to help you evaluate the result.