Why do dogs lick themselves before sleeping?

Why Dogs Lick Themselves Before Sleeping?

Ahhh, sleep, that peaceful pleasure. Slurp! … As I was saying, sweet slumber, drifting, drifting … Slurp! Few things are more annoying than the wet, sloppy sound of a dog licking himself when you’ve just crawled into bed. It’s like nails on a chalkboard —
especially when it won’t stop. Why do dogs lick themselves before sleeping?