If your iPod 5th Generation suddenly loses the sound, even if you know the volume is turned up, then the first thing to do is restart it to see if it the sound will come back on when it starts back up. To do this, hold the On/Off button and the Home button down at the same time until the Apple logo shows up. If that doesn’t fix the sound, then you need to reset all your settings to see if that will make the sound come back on.

To reset all the settings on your iPod 5th Generation, go to Settings/General/Reset and choose “Reset All Settings”. This won’t affect any of your saved information such as your contacts, songs or videos, but it will reset all your preferences and the iPod settings. If the sound still doesn’t work, then you can try to restore your iPod from a backup from either iCloud or iTunes. If that doesn’t fix the sound, then you may need to contact Apple and report a hardware problem.

Source Apple Forum