1.Ensure you have the latest firmware update for macbook that v1.1
2.if you haven't got it download it and when the restarting problem occurs press power buttons when the computer is rebooting keep the buttons pressed until you hear the chime...then install the update.ENSURE ALL DEVICES ARE DISCONNECTED FROM LAPTOP DURING UPDATE OF THE FIRMWARE 3.Try RESEATING the RAM
that should do the trick.... best of luck!!!!! "
Seriously, guys, give this a try. I've done it (as well as resetting the SMC) and so far no more restarting.
I just used that link to fix my problem, you rock. My macbook would freeze after closing the lid, while the computer was on. When I opened it back up the screen would be black and it would be frozen. I would need to power it off, then on, to get it back up.