Sir Toby and Maria wrote a fake love letter to Malvolio as part of a prank to make him believe that Olivia was in love with him, in order to embarrass him and disrupt his behavior. They did it for entertainment and to teach him a lesson for being pompous and overconfident.
Malvolio discovers that Maria wrote the love letter when he confronts her in Act 5, Scene 1 of Shakespeare's "Twelfth Night." After being deceived and humiliated throughout the play, he realizes the truth when he sees Maria alongside Sir Toby and the others who orchestrated the prank. This moment highlights the theme of mistaken identity and the consequences of ambition, as Malvolio's earlier self-confidence leads to his downfall.
Once Malvolio exits in Shakespeare's "Twelfth Night," Maria plans to further humiliate him by having him locked in a dark room, pretending he has gone mad. She, along with Sir Toby and others, concocts a scheme to manipulate Malvolio using a forged letter that he believes is from Olivia, leading him to act foolishly. This scheme highlights the themes of deception and the folly of ambition, as they take pleasure in his misery. Maria's cleverness and resourcefulness are showcased as she plays a central role in the prank against Malvolio.
He is not really. But he is incredibly vain so he imagines himself as being the beloved of Olivia and therefore having power over her household, even (and perhaps especially) Sir Toby. Sir Toby is family and Malvolio is only a servant, so Toby can rebuke him all he likes, and Malvolio can only take his revenge in fantasy. When Maria's letter falls into his hands, the possibility arises that fantasy may become reality. Still, Malvolio's dreams of the greatness that is to be thrust upon him is limited to the suggestion in the letter--that he might marry Olivia and be in charge of the house. This is really a modest ambition, when you think of it.
The gulling of Malvolio occurs in Act 2, Scene 5 of Shakespeare's "Twelfth Night." In this comedic scene, Maria, Sir Toby, and Sir Andrew trick Malvolio into believing that Olivia loves him by planting a false letter that he finds. The letter is cleverly crafted to play on Malvolio's vanity and ambition, leading him to act foolishly as he imagines himself as Olivia's suitor. The scene highlights themes of deception and social ambition, ultimately showcasing Malvolio's misguided self-importance and the humor in his downfall.
I think by pranks you are referring to Malvolio and what the others told him. He was sent a letter by Maria, Toby and Andrew who pretended to be Olivia. They told him to wear yellow stockings and crossed garters, to smile inanely and refuse to explain himself to anyone to show his love for Olivia. Therefore everyone other than Maria, Toby and Andrew thinks that he is mad.
Malvolio was sent to tell Sir Toby Belch that Lady Olivia was in mourning and would not be receiving visitors. He aimed to convey Olivia's strict wishes and to discourage Sir Toby's rowdy behavior and revelry during her time of grief. Malvolio’s message exemplified his role as a puritanical figure, contrasting sharply with Sir Toby's carefree and indulgent nature.
Fabian agrees to help trick Malvolio because he finds amusement in the idea of exposing Malvolio's self-righteousness and pretentiousness. He enjoys the camaraderie with other characters, particularly Maria and Sir Toby, and sees the plot as a way to entertain themselves at Malvolio's expense. Additionally, Fabian's involvement allows him to take part in the playful subversion of social norms and to challenge Malvolio's authority within their social circle.
Because he is bad a pranks
In Shakespeare's play "Twelfth Night," the characters of Sir Toby Belch, Sir Andrew Aguecheek, and Maria stage a prank on Malvolio, making him believe that Olivia loves him. This prank culminates in Malvolio acting foolishly and being confined to a dark room as punishment.
It's a comedy. There are three weddings at the end (Viola and Orsino, Sebastian and Olivia, Sir Toby and Maria), and although things don't turn out so great for Sir Andrew or Malvolio, at least they are not dead.
All the confusion and trickery is revealed. Sebastian and Viola are reunited. Duke Orsino marries Viola. Lady Olivia marries Sebastian. Sir Toby marries Maria. Malvolio leaves and threatens revenge.
At the end of "Twelfth Night," Malvolio is released from captivity after being tricked and humiliated by other characters, particularly by Sir Toby Belch and Maria. He is enraged and vows revenge on those who wronged him, declaring that he will be "revenged on the whole pack of you." His final lines highlight his bitterness and sense of injustice, contrasting with the play's overarching themes of love and forgiveness. Ultimately, Malvolio's fate serves as a cautionary tale about pride and the consequences of self-righteousness.