Is there any pattern to the circumstances when your iMac freezes? You should have further diagnostics done to determine why your iMac freezes.
To answer your specific question about sleep vs. shutdown, you will find arguments in favor of both. You will have to make up your own mind which you prefer.
That said, it has always been my practice to shut down my Macs and turn off the surge protectors my devices are are plugged into when I am not using them. That means at least once every day, when I'm done for the day. I believe it's in the best interest of protecting my Macs from misuse, burnout, surges, potential hacking and more.
Plus, the power savings over the course of years by turning off devices I am not using. (Macs, external drives, scanners, printers, sound system, etc.)