Safe to remain connected on the internet 24/7?

I looked for a category to post this question, but didn't see one.
I've always used a PC, and every time I would be done using the internet, I would disconnect and run ccleaner.
I just ordered my first iMac, and am somewhat aware that Apple OS is a lot safer and secure than PC.
My question is that, even though the computer will be put to sleep when not in use, is it safe to keep the internet connection live?
Thank you for any response.
The most important thing you can do is make sure that you, and your trusted devices are the only things that can use your home network and its internet connection... you're fine to leave your Mac on 24-7.
Thank you both for your insight.
On my PC i use Kaspersky, and scan with Windows Malicious Software Removal Tool.
My understanding is on a Mac, the use of an internet suite is not needed. Am I correct in this thought?
If I may ask a serious question, why do you want to keep your computer on 24/7?

Original thread: https://forums.imore.com/threads/safe-to-remain-connected-on-the-internet-24-7.304099/