The word "sound" has several different meanings in English because the noun, verb and adjective forms each have different origins. In this example, soundly means "securely".
If you sleep soundly, that doesn't mean you snore! You are "sleeping like a rock", or "dead to the world".