If you like drifting off to music but worry about it continuing to play all night long, worry no more – you can actually use a lesser-known setting in the default iOS Clock app to automatically switch off the music after a set time.

Put on some music or a podcast from your favorite audio app. Then, open the Clock app and tap the Timer tab. Swipe to select an amount of time, as if you were setting an alarm or a kitchen timer.

Tap When Timer Ends and then scroll past all the ringtones to the Stop Playing option. Select this and tap Set in the top right. Then it’s just a case of pressing Start when you’re ready for the countdown to begin, and the audio will automatically stop once the timer runs out.

Just don’t forget to change the timer back to a regular ringtone next time you use it – otherwise, you won’t hear anything when it goes off!