You can train your dog by teaching it to sit in a fixed spot when meeting a stranger. You can also play “ignore” with a friend and treat the dog afterward. Another way to train is to maintain distance from strangers, or you can play distraction so that your dog stays away from strangers.
Some people believe that dogs smell good when they sleep because of some internal reaction that happens as they sleep. It smells like warmth releasing from the dog. However, no scientific answers have been found on this matter so far. Dogs do smell when they sleep, but it may not always be pleasing.