There are all kinds of ways to deal with Sleep mode on your Mac. There is Display Sleep only or you can combine that with putting your hard drive to sleep as well. You can set up various timings for these events. On my iMac I don’t sleep the hard drive, but I do sleep the Display. This article explains the various settings for sleeping your Mac.