Why do dogs roll on their backs?
Dogs roll on their backs for a variety of reasons. The most common reason is simply because they may have an itch that they need to scratch. Since dogs are incapable of itching their own backs, rolling on their backs is a good way to alleviate an itch. Rolling around on their backs is also a form of play.
A dog could also be rolling on his back to mimic killing prey. In the wild, a dog will roll on its prey after is has attacked and killed the small animal to ensure that it is dead, and also to pick up its scent. In much of the same way, a dog may roll around in a smelly area or on something dead in order to disguise his own scent. In the wild, dogs do this so that they can sneak up on prey with their disguised scent.
Dogs also use scent to communicate messages to other dogs, and to show territory. A dog could be rolling on his back on another dogs scent (such as a urine spot) to eradicate that scent and smother it with his own scent. Likewise, a dog could roll on his back in a smelly area simply to mask his own scent, not aware that what he is rolling in smells worse than he does.