Yes, you can use the Bang and Olufsen app to define for how long Beoplay M5 continues to play, when not interacted with.
- In the Bang & Olufsen app, tap the "Settings" icon in the upper-right corner
- Select "Settings"
- Select "Products"
- Select your Beoplay M5
- Select "Configure"
- Select "Settings"
- Select "Maximum playback time"
- Choose between:
- 4 hours
- 12 hours
- 24 hours
- Endless (continues to play until manually switched off)
- Press "Change" to Save.