According to Spoiler TV.
The two theories I’ve seen are that it’s a reference to the episode of Star Trek titled “Amok Time”; or that it’s a reference to the Loony Toons short “Duck Amuk”. Since the title is more like the latter, I think it’s more likely a Loony Toons reference.
From Wikipedia, the plot of the short:
It stars Daffy Duck, who is tormented by a seemingly sadistic, initially unseen animator, who constantly changes Daffy’s locations, clothing, voice, physical appearance and even shape. Pandemonium reigns throughout the cartoon as Daffy attempts to steer the action back to some kind of normality, only for the animator to either ignore him or, more frequently, to over-literally interpret his increasingly frantic demands.
Sounds like a meta-episode to me. And a pretty interesting one at that.