While I am not a Mac expert, I would check into the Mac's power settings for what the computer does when it goes into sleep mode.
Like a Windows computer, your Mac might give you a number of options on shutting down the monitor, hard drive, and other items, including the printer ports. If this printer is connected using a
USB port, then ensure your
USB is not controlled by the power saving settings because that very often is a target of power savings, and computers have an option to let the
USB be controlled by the screen saver/power saver. As you can see, below, this port is controlled in that way. Your Mac may have a similar set of options.
Good Luck,
-a.