If you're asked to sign one when you leave, depending on your contract, any severance package might be considered consideration.
You're looking at it the wrong way. There are two ways the company can approach it. The first: we need to let this person go, but we don't want to fuck up his career and personal life and we don't want him fucking up ours, so we'll give enough severance to cover the gap and a positive reference. And no lawyer will let the company offer severance without nonlitigation and nondisparagement. The second: fuck this guy, toss him overboard. Usually, when a good company does a layoff, it's the first. That's why they offer the severance. In part, it's to keep you from saying bad things about them. But it's also, at good companies, because they know it pays off in the long-term to have the people they laid off still feel some good will toward them. Careers are long.
If I had a choice to sign the agreement or not, of my own free will and with no incentive, I may actually do so. Like you, I have no particular desire to speak ill of anyone, deservedly or not. Time spent disparaging a former employer is time which could have been better spent moving forward.
But when you offer me an incentive for signing the contract? It makes me wonder why these rights I'm giving up are worth so much to the company. And feeling like I'm being bribed or pressured to do something is one of the best ways to manipulate me into not doing it, just because I'm so stubborn :)