Slowing the Roll
No matter the reason, you probably just want your dog to stop this maddening activity that brings him so much joy and you so much grimy carpet. So how can you halt this behavior? You likely won't be able to curb whatever instinct is driving your dog, but you can limit his opportunities.
When you're on a walk, keep your dog on a leash in places where you know he's likely to stop, drop and roll. Pick up poop in your yard as soon as your rolling-happy dog does his business, and keep an eye out for dead animals, mud or other hazards. You can also teach your dog to obey a basic command like "leave it" or "come" that will lure him toward positive attention instead of messes.
Dogs also have a knack for getting into garbage. While most of the time this is because they are looking for an extra snack you might have thrown away, they are not above rolling around in the garbage, especially if it is particularly stinky. Make sure to secure your trash cans so that your dog cannot get into them to help prevent smelling stinky garbage everywhere your dog decides to go in the house after.

The Stink Is Up. Now What?
As hard as you try, sometimes one whiff tells you your dog found his way to his super stinky happy place when you weren't paying attention. You're going to have to clothespin your nose and lather him up. There are odor-neutralizing shampoos on the market, some of which include orange oil (recognized as a safe deodorizer and degreaser for malodorous mutts).
Another option is to mix baking soda, hydrogen peroxide and a gentle liquid dish soap in a metal bowl. Bathe your dog in the mixture, but be careful to avoid his eyes because it can burn. Rinse the dog very well when you're done. This home remedy was actually proven to work on an old episode of MythBusters.
If your dog likes to come home smelling like poo-fume rather than perfume, we're sorry. But you can overcome this stinky situation by paying close attention to your pup outdoors and keeping pet-safe cleaning supplies on hand. After all, stinky dogs deserve love, too.