Fret not, however, as there is now a very simple way to set different sleep/awake notification volumes, in the form of a tiny APK file that you need to sideload on your Android handset, courtesy of the XDA-Devs member Sanryd. The developer called its app simply Awake/Sleep Volume Adjuster, and it does just what it says on the tin, without unnecessary distractions.
Download the Awake/Sleep Volume Adjuster APK file1.
2. If you've gotten it on your mobile device, tap install from the status bar, or go to the Downloads folder, and install it from there. Remember to turn on the "Apps from unknown sources" setting in the Developer options of your General settings tab. If you have downloaded on your computer, transfer the file to your phone, and using a file browser on it, locate the app, and install it.
3. Start the app, and use the default Awake/Sleep volume settings of 1 and 7, or move the sliders to your own custom volume levels. If you move the Awake slider to 0, the phone will simply vibrate when you get a notification message.
4. Hit the "Enable Volume Adjuster" option at the top. That's it, now you have two separate notification volume settings for when your Android is with a locked screen in your pocket, and when you are actually using the handset, and don't want to get startled by loud notification noises.
source: Sanryd (XDA-Devs)