This is when Taking a Level in Jerkass is plot-requested. Sometimes, an otherwise nice person becomes a Jerkass unexpectedly, most likely to advance the plot, to teach An Aesop, or sometimes simply for humor value.
In-story, the sudden change in behavior can have a variety of reasons. Sometimes they're mundane everyday reasons such as merely having a bad day and can include longer-term ones such as intense levels of stress over an extensively period of time. Others could because of certain scenarios; maybe that one activity just has them lose their patience. Sometimes the Jerkass Ball is a more literal thing, such as alcohol and the character in question being a mean drunk. Of course, supernatural, paranormal or abnormal items being the literal Jerkass Ball is common too; the portrayal of Superman under the effects of Red Kryptonite is an example.
If done to deliberately take The Straight Man or Nice Guy down a peg, it counts as Not so Above It All.
Opposite of Kindness Ball.
Common in You Go, Girl! plots, where male characters who have never demonstrated any kind of sexist behavior before suddenly turn into raging Straw Misogynists.
Acquired Situational Narcissism is a specific ego centered example of this trope.
May overlap with Not Himself, Nice Job Breaking It, Hero, Depending on the Writer and Comedic Sociopathy. If done in a particularly exaggerated manner that in no way befits their normal characterization it is likely an Out-of-Character Moment or a Moment of Weakness. If the character has not actually become a Jerkass, but merely presented that way, it's Superdickery. Not to be confused with the Haters' Ball.
Despite being a temporary change of personality plot wise, characters can eventually snap themselves out of it, leading them to an apology and/or a reconcilement scenario between the other characters during the plot.