One of the more hilarious themes presented in this play is the danger of ambition and how unbridled ambition can make humans ridiculous. This is of course demonstrated primarily through the character of Malvolio. It is the way that Maria successfully dupes Malvolio through the letter that she writes, adopting the hand of her mistress, that exposes the ambition that Malvolio has to rise above his social station in life and become the husband of his mistress. Note what he says when he begins to dream about the future he will enjoy as the master of the household:
I do not now fool myself, to let imagination jade me; for every reason excites to this, that my lady loves me. She did commend my yellow stockings of late, she did praise my leg, being cross-gartered, and in this she manifests herself to my love, and with a kind of injunction drives to these habits of her liking. I thank my stars, I am happy.
Of course, what his ambition drives him to do shows him to be above all a ridiculous character, and the scene where he wears cross-gartered yellow stockings and smiles to attract the love of his mistress is surely one of the most hilarious in all of Shakespeare's comedies. However, it is important not to let the comedy of such scenes blind the audience from the important warning contained therein: it is dangerous to give onself over completely to ambition. Forgetting one's sense of identity and aspiring too far above what is possible is a risky activity, and Malvolio's punishment, although extreme, shows the way that such attempts rarely succeed.