|It could be overheating. Buy a can of that compressed air that's purpose made for blasting dust & debris from inside computers (Amazon sell it much cheaper than shop prices).|
Unplug the computer.
Open the side panel which reveals the populated side of the motherboard.
Give the inside a good blast around the components, fans, and ventilation grilles.
Re-attach the side panel, plug it in and see how it runs.