Do you get any error messages?
What do you see when it "won't boot"?
The PRAM batteries do get old and fail.
I believe the one in my 2006-vintage white Intel iMac is completely dead.
But it still boots.
Do you normally keep the iMac plugged directly into the wall?
Or... is it plugged into a power strip that is normally "left on"?
If either of the above is true, I'd like to make a suggestion.
I know it sounds off-the-wall, but I would recommend that you try "my way" for a period of 4-6 days, to see if it makes any difference.
Here's what to do:
1. If you keep it plugged into the wall:
1a. At night, shut it down (all the way off)
1b. After it "goes dark" PULL THE PLUG OUT OF THE WALL
1c. In the morning, plug it back in, then press the power-on button.
2. If you leave it plugged into a power strip that is ALWAYS powered on:
2a. At night, shut down
2b. Reach down and POWER OFF the power strip
2c. In the morning, reach back down and power ON the power strip, then press the iMac's power on button.
Again, try this routine for 4-6 days, and if it changes anything, let us know.
Personal experience:
I use the #2 routine above, but I've always run things this way.
Actually, with [what I believe to be] a dead PRAM battery, as soon as I power-on the power strip, the iMac boots up on its own without even having to push the power-on button.