Twelfth Night's act 3, scene 4, has been set up in the "gulling of Malvolio" scene. As a result, it offers the audience comic satisfaction. Like the gulling scene, in which Malvolio finds the counterfeit letter, this scene offers a strong sense of why Malvolio is despised by the most comical characters in the play.
Here, having taken the bait, Malvolio comes to Olivia in yellow stockings with a ridiculous grin on his face. He misreads the situation entirely, crosses all sorts of boundaries with Olivia, and refuses to take correction. In this way, while we can sympathize with Malvolio for being yet another person in the play whose love is unrequited, his error comes from thinking far too highly of himself and far too scornfully of most everyone else. His lack of self-awareness and his lack of understanding of his presumed love object makes his role as a lover entirely comic.
One of Malvolio's distinct qualities is his lack of openness. Here, he largely parrots what he thinks is Olivia's language in the letter. In other scenes, he rarely advances an idea of his own. He seeks to shut down other's enjoyment and preens himself as a person of significance. In all ways, he lacks the spirit of comedy, which involves a bit of humility and an acceptance of folly. As a result, this scene is both Maria and Sir Toby's (but also the comic play's) revenge on the character who sought to deny a comic perspective.
The closing of the scene, when Malvolio again overtly insults Sir Toby and Maria, offers the satisfaction of revenge:
Go, hang yourselves all! you are idle shallow things: I am not of your element: you shall know more hereafter.
At this point, the plot against Malvolio turns crueler, but here in the middle of the play, this is sweet revenge for his having denied the spirit of revelry.