Is the bottom of the laptop very hot to the touch when it shuts itself down ? If so, might be some overheating problem like you were thinking.
Did your laptop run fine before ? Is it brand new ? Could be some temperature sensor that's failing, or a dying Power Supply Unit.
Unexpected shutdowns can also come from faulty ram. But in that case, I don't see why you should have to unplug and replug the power cable. You could still try to burn a
memtest CD and boot your computer with it to test your ram. It's a very handy tool you'd want to keep around if you have to troubleshoot any computer that shutdowns randomly.
Can't say much more, I'm not very familiar with laptops