If your Mac won’t go to or stay in sleep
If your Mac doesn’t go to sleep when you expect it to, or if it wakes up unexpectedly, you may need to change your sleep preferences. If that doesn’t work, something may be waking your Mac.
Check your system’s sleep settings: Make sure the sleep settings are set the way you want. To view sleep settings, choose Apple menu > System Preferences, then click Energy Saver.
To set the amount of time that should pass before your computer goes to sleep, drag the “Computer sleep” and “Display sleep” sliders, or the “Turn display off after” slider. If your Mac has the “Turn display off after” slider, deselect “Prevent computer from sleeping automatically when the display is off” in the Power Adapter pane.
Check your system’s network access setting: Other users may be waking your Mac remotely to use its shared resources. If you don’t want this to happen, choose Apple menu > System Preferences, then click Energy Saver.
Then deselect “Wake for network access”.
Check your system’s Bluetooth settings: Bluetooth devices can wake your Mac. If you don’t want a Bluetooth keyboard or mouse to be able to wake the Mac, choose Apple menu > System Preferences, then click Bluetooth.
Click Advanced, then deselect “Allow Bluetooth devices to wake this computer”.
Check your system’s sharing preferences: People using shared services on your Mac can prevent it from sleeping. For example, they may be using a printer connected to your Mac or accessing shared files stored on it. To check to see that you’ve enabled the right set of sharing preferences, choose Apple menu > System Preferences, then click Sharing.
Then turn off any services you don’t need to use by deselecting the On tickbox next to the service.
Check your system’s activity: Processes running in the background can prevent your Mac from sleeping. Check Activity Monitor to see if a process is unexpectedly using your Mac computer’s central processing unit (CPU). Open a Finder window, then go to Applications > Utilities > Activity Monitor. Click the CPU button at the top.
Check to see if something else is waking your Mac: Check any of the following:
Unexpected keyboard presses or mouse and trackpad clicks: Key presses and mouse or trackpad clicks can wake your Mac. If your Mac wakes when you’re not present, something may be pressing the trackpad or mouse button or keyboard keys.
Apps: Apps that access a disk can keep your Mac from going to sleep. For example, Music accesses your disk to read the songs it plays, and DVD Player accesses the optical disc drive to play films.
Spotlight indexing: If Spotlight is indexing your hard disk, your Mac won’t go to sleep. Click the Spotlight icon on the right side of the menu bar of your Mac to see if Spotlight is indexing. Indexing can take several hours, depending on the number of files on your Mac.
Connected storage and devices: Malfunctioning USB, FireWire and Thunderbolt storage and devices may keep your Mac from going to sleep. Disconnect those devices and see if your Mac goes to sleep. If it does, reconnect each item, one at a time, until you find the one that’s malfunctioning. Contact that device’s manufacturer for more information.