I'm glad you got it to work for now, I'm leaving a reply here in case it returns.
If cleaning the fans helped then it could be overheating, you can run a program to monitor the current temps on your system to make sure it's not simply running too hot when playing those games. If it's not overheating then it could be the PSU that's either malfunctioning or it's too weak but since cleaning the fans helped I doubt that's the issue. You can change your BIOS settings to not reboot on failure and instead bring up the bluescreen error message so you get a better idea of what's causing the problem.