How To Set a Sleep Timer in Apple Music on iPhone And Mac

How To Set a Sleep Timer in Apple Music on iPhone And Mac: Have you ever experienced falling asleep while listening to your favourite music, only to wake up in the middle of the night with the music still playing? If this sounds familiar, you’re in the right place. In this article, I will demonstrate a straightforward and user-friendly method on how to set up a sleep timer in Apple Music on iPhone and Mac.

Note: The steps provided can be applied to most music apps, such as Spotify and Amazon Music. However, it’s worth mentioning that many Apple Music alternatives already have built-in sleep timer features.

How To Set a Sleep Timer in Apple Music on iPhone And Mac

Though you need to know how to set sleep timer on both iPhone And Mac, but one at a time. Let’s go with iPhone first.

How to Set a Sleep Timer in Apple Music on iPhone

There are two convenient methods to set a sleep timer for Apple Music on your iPhone, both of which are detailed below.

Method 1: Using the Clock App

  1. Open the pre-installed Clock app on your iPhone.
  2. Tap the Timer option located in the bottom right corner.
  3. Select your desired duration for the timer.
  4. Tap “When Timer Ends,” scroll down, and choose “Stop Playing.” Then, tap “Set.”
  5. Start the timer by tapping the green “Start” button.
  6. Now, open the Music app, play your favourite tunes, and the music will automatically pause after the timer duration.

To cancel the Apple Music sleep timer, simply access the Clock app, tap “Timer,” and choose “Cancel” or “Pause.”

Method 2: Using the Shortcuts App

For those with consistent routines, creating an automation to stop the music at a specific time can be a practical approach. The following steps may appear lengthy, but they are easy to follow in practice.

  1. Launch the Shortcuts app on your iPhone and access the Automation menu.
  2. If you haven’t created an automation before, tap “New Automation” (blue button). If you have, tap the plus (+) button in the top-right corner.
  3. Select “Time of Day” and set the activation time and repetition frequency.
  4. Choose “Run Immediately” and tap “Next” in the top-right corner.
  5. When prompted, tap “New Blank Automation” and add an action.
  6. In the search bar at the top, type “Pause.”
  7. Select “Play/Pause” (the one with the red play/pause icon).
  8. Once again, tap “Play/Pause” and choose “Pause” from the dropdown menu.
  9. Complete the process by tapping “Done” in the top right.

If you no longer need this automation, open the Shortcuts app, access “Automation,” swipe left on the “Play/Pause” automation, and tap “Delete.”

How to Set a Sleep Timer in Apple Music on Mac

As of now, there is no direct method to set a sleep timer for Apple Music on Mac. However, you can utilize a Terminal command to enable this feature. Here’s how:

1. Open the Terminal app on your Mac.

2. Paste the following command and press “Return”:

sudo shutdown -s +60

Here, the “+60” represents the number of minutes before your Mac will shut down. You can modify this value according to your preference.

3. Enter your device’s password when prompted.

Now, your Mac will automatically shut down after the specified time. If you wish to cancel this setup, simply paste “sudo killall shutdown” in the terminal.

Setting a Sleep Timer for the Music App on HomePod

For HomePod users, activating a sleep timer to stop music in Apple Music is hassle-free. While your music is playing, you can instruct Siri with commands like “Hey Siri, stop the music in 30 minutes.” The sleep timer will be set, and the music will cease playing at the designated time.

Why Consider Setting a Sleep Timer in Apple Music?

Setting a sleep timer for Apple Music provides several advantages:

  • Battery Conservation: It helps conserve your device’s battery and prevents unnecessary disruptions during your sleep.
  • Customizable Timer: You can personalize the sleep timer duration, offering more flexibility than most third-party apps.
  • Relaxation and Quality Sleep: You can enjoy a tailored, mood-enhancing musical experience that promotes relaxation without overburdening your device throughout the night.


Utilizing the sleep timer feature in Apple Music, whether on your iPhone or Mac, offers valuable benefits for those who value quality audio enjoyment and sound sleep hygiene. Feel free to share your experiences and thoughts in the comments, sharing how this approach has worked for assessing your iPhone or iPad’s battery status.


Will the sleep timer affect other sounds on my device?

No, the sleep timer exclusively applies to Apple Music, leaving other system sounds and notifications unaffected.

Does the sleep timer work for all types of content on Apple Music?

Yes, the sleep timer is compatible with all types of content on Apple Music, including songs, albums, and playlists.

Priya Singh

Hey readers! I'm Priya Singh Founder of (, I am full-time Digital Marketer, Organic Affiliate Marketer & a Blogger.

Leave a Comment