In this saying, the word 'lie' is used with the same meaning as someone will lie down on a bed, not lie as in tell an untruth. Imagine you are trying to walk past a fierce dog who is asleep. It is better to sneak past leaving the dog lying asleep, rather than waking it.
While that is the literal meaning, it is a way of saying if there is a potentially bad or difficult situation, but it is not causing you a problem at this time, do not do anything that will remind people of it.
For example, if you had a disgreement with your friend, and you parted on bad terms. When you meet again, your friend does not talk about the argument. You decide it is 'best to let sleeping dogs lie' by not saying anything about the argument yourself so you can continue being friends.