Hi Perry,
welcome to the forum.
Two ways you can do this:
1.) You can either go back to the song that is playing and press the pause/stop button.
2.) Or double hit the home button until you get the multi-task bar. Slide the apps to the right, until you get the volume control panel. From there you can stop your music as well.
You need to do either, prior to putting your pad to sleep. Otherwise it will still play when switched to sleep mode. Hope that helps!