Yes, as that model ages, it tends to have heat issues. Ours starting doing thermal shutdowns after I installed a larger and faster hard drive that, presumably produced more heat than the original 10G drive.
Ours worked well enough in mild weather but our daughter had it in her apartment in Portland OR drung a heat wave. It was commonly 85-90F inside her appartment in the afternoon and that's when the iMac decided it was not going to work well any more.
The particular part that seems to suffer from the heat is the power/analog/video board--or "PAV" board. Once cooked it seldom recovers, and new PAV boards have not been built in years; there's little chance of finding one that has not already been "in the oven."
You can try active cooling. Find a laptop computer cooler pad with one big fan in the middle. Avoid those with two fans offest to the outside--you want something with a centered, powerful fan. Confirm that the fan blows air UP (some blow down). Position the iMac on the cooler pad so the fan is centered over the lower vents.
Another active cooling solution is ugly but actually works well. Some people have bought a large 120mm fan used in cooling big tower-type computers and screwed it to the outside of the upper exhaust vent so it pulled air from bottom to top. Works a trick but tends to sully the simple and attractive lines of the CRT iMac. However, if function is important, this is best way to get enough cooling to prevent further heat damage to the interior components.