An app to stop another app (Music Player) after some time
Launch Clock
Choose Timer
Tap on When Timer Ends
Scroll right to the bottom and pick Stop Playing
Set your time - say, 20 minutes (or whatever time you want) and tap on Start


Hope this helps.