Do you like to listen to songs on Apple Music before sleeping? If yes, then you've probably been looking for a way to automatically stop the music after you fall asleep.

It would be amazing if Apple Music could stop playing music the moment you doze off, but as of writing, such functionality is only available in the Android app. On iPhone, Mac, and Windows, we'll just have to rely on good old timers to get the job done.

We'll show you how to set sleep timers on Apple Music for every device.

How to Set a Sleep Timer for Apple Music on an iPhone

There are a variety of features that make it worth paying for Apple Music. However, while Apple's Podcasts app has a sleep timer built in, the Music app does not. This is the kind of design inconsistency that creates confusion, but we're here to fix that.

There are two ways you can set a sleep timer in Apple Music on your iPhone, and you can pick the one that works best for you.

1. Use the Clock App to Set Apple Music Sleep Timers

The Clock app lets you set a timer to stop playing music when the time's up. Here's what you need to do:

  1. Open the Clock app on your iPhone and tap Timers, which is at the bottom right.
  2. Now, choose the duration of your sleep timer. We went with 30 minutes because that's how long it usually takes us to doze off, but your mileage may vary. Once you've done this, tap When Timer Ends.
  3. Scroll to the bottom and tap Stop Playing. Then tap Set.
  4. You'll return to the timer screen. Tap Start.
  5. Finally, you can open Apple Music to play any songs you like. The music will automatically stop when the timer ends.

2. Create an Automated Sleep Timer

Alternatively, you can set a sleep timer for Apple Music by setting up automation routines on your iPhone. With this method, you can make music stop playing automatically at a fixed time every day.

This method works best for those of you with a regular routine; if your sleep time varies a lot, it's not the best. Here's what to do:

  1. Download and open the free Shortcuts app on your iPhone and open it.
  2. Select the Automation tab at the bottom.
  3. If you've never created an automation on your iPhone, tap the blue button labeled New Automation. Otherwise, tap the plus (+) button in the top-right corner.
  4. Now tap Time of Day and choose when you'd like to pause Apple Music. The default repetition frequency is Daily, but you can select Weekly to choose specific days of the week under Repeat. Next, select Run Immediately, then tap Next in the top right.
  5. On the next page, tap New Blank Automation > Add Action.
  6. In the search bar at the top, type Pause. Now tap Play/Pause (the one with the red play/pause icon next to it).
  7. Once again, tap Play/Pause and select Pause from the menu.
  8. Now tap Done in the top right to finish.

You can now just play music every evening, and your iPhone will automatically pause it at the time you set.

How to Set a Sleep Timer for Apple Music on a HomePod

If you listen to music on a HomePod, it's very easy to set a sleep timer for Apple Music. Once you have music playing on the HomePod, just say:

Hey Siri, in two minutes, stop.

This will enable your sleep timer. In our experience, Siri's very inconsistent, so if you try saying the Siri command differently, you may not get the desired result.

How to Set a Sleep Timer for Apple Music on Android

You don't need to download a third-party app to set a sleep timer for Apple Music on an Android device. The feature is baked right into the app.

Follow these steps to set it up:

  1. Open the Apple Music app on your Android phone.
  2. Play any song and tap the playback menu to view the Now Playing screen.
  3. Tap the three-dot menu next to the song name to view more options.
  4. Next, select Sleep Timer.
  5. Choose when you want Apple Music to stop playing your music from the provided options in the Sleep Timer menu.

You'll see a confirmation pop-up at the bottom when you select an option. Now, your Apple Music songs will pause automatically after the set duration.

How to Set a Sleep Timer for Apple Music on a Mac

With the introduction of revamped System Settings in macOS Ventura, setting a sleep timer in Apple Music is not possible. Now, all you have is the macOS Terminal app.

This is what you need to do to set a sleep timer:

  1. Open the Terminal app on your Mac.
  2. Type the following command and press Enter on your keyboard:
            sudo shutdown -s +60
        
  3. Enter your password to confirm.
    Scheduling Mac shutdown using the Terminal app

This command tells your Mac to shut down after 60 minutes (indicated by +60). Of course, you can customize this based on your preferences to automatically shut down after, say, 30 minutes by replacing +60 with +30. If you want to stop the schedule, run the following command in the same terminal and press Enter:

        sudo killall shutdown
    

Now, you can play music before bedtime, and the Mac will automatically pause it and shut down after the specified time. Putting your Mac to sleep may not be the most elegant solution for a sleep timer for Apple Music, but it does the job just fine. If Apple adds a native sleep timer, it will certainly be one of the features to try in Apple Music.

How to Set a Sleep Timer for Apple Music on Windows

Once again, it's best to schedule a sleep timer for the entire computer to automatically pause Apple Music on Windows.

Here's how to schedule a sleep timer on Windows:

  1. Press Windows key + R.
  2. Type cmd and hit enter.
  3. Type shutdown -s -t 3600, where 3600 is the number of seconds for the timer. You can change that to any number you like. Hit Return.

This will shut down your computer automatically after the specified time, and, as a result, Apple Music will pause, too.

Let Apple Music Put You to Sleep

There's no telling when Apple will ship a built-in sleep timer with the Apple Music app on all platforms. But with this guide, you should be able to use the service to listen to soothing bedtime tunes without worrying about pausing Apple Music before going to bed.