This used to also hapen to my on my laptop, I think it was because of a faulty piece of ram, but i'm not sure. Try
Memtest dunno if it will help.
It could of course also be that your fans are cloged up, tr using a
weak vacum cleaner to take the dirt n stuff out. Although I would be careful with that. It hapened to me too on that laptop, it worked, but the started again. While playing games it would just switch off...
That laptop was serious crap. Bad advice from my dads "friend"