4th gen iPod Touch upgraded to iOS 5 doesn't play through dock connector when screen locks
This is a problem I had with my app as well. Since iOS 5 an app is paused as if you had hit the home button when the screen locks. Unless the developer of the app in question adopts background audio, there isn't anything you can do.

My recommendation would be to find a few mp3s to relax, since Apple's music app runs just fine even if the screen is locked.