In Act II, Scene 2 of Shakespeare's A Midsummer Night's Dream, Puck mistakes the Athenian on whom he is to drop the love portion. After searching through the forest, he finally espies one who wears "Weeds of Athens"(2.2.71) and mistakenly anoints Lysander instead of Demetrius.
In Act III, Scene 1 as the mechanicals rehearse their play in the wood where Titania lies asleep. After Bottom savours the flowers of the scene, he is supposed to hear a voice and exit. Puck remarks it is a strange Pyramust than he has ever seen, he does follow Bottom. Then, when Bottom reappears, the others scream and flee, for Bottom now has the head of a donkey. Then, in Scene 2 of this same act, Puck enters another part of the wood with Oberon, boasting of his pranks:
My mistress with a monster is in love
Near to her close and consecrated bower....
Made senseless things begin to do them wrong;
....I led them on in this distracted fear,
Titania waked, and straightway loved an ass. (3.2.31-35)
Puck goes on to tell Oberon that he anointed the Athenian. However, when Hermia and Demetrius enter, Puck claims that Demetrius is not the one whose hair he cut; Oberon then order Puck to "go swifter than the wind" and find Helen of Athens. However, as he prepares to leave, Puck overhears Hermia and Demetrius, who is pleading for "a lover's fee" (3.2.114) Puck then asks if Oberon wants to watch "What fools these mortals be.
The incident that you have mentioned takes place in Act II Sc.2 of Shakespeare's "A Midsummer Night's Dream."
Puck under orders from Oberon his master applies the juice of the magical flower "love-in idleness" on Lysander's eyes instead of Demetrius':
Lysander is fast asleep when Puck applies the magical potion and a little later is woken up by Helena who has been abandoned in the forest by Demetrius. Immediately to Helena's horror Lysander falls in love with her and begins woo her:
It is in Act III Sc.1 that Puck fits the head of an ass on Bottom's head without his knowledge. During the rehearsal of the play Bottom hears a noise and goes out to find out what the noise is about, just then Puck fits the head of an ass on Bottom and the stage direction reads:
Re-enter PUCK, and BOTTOM with an ass's head
However, it is only in the next scene that is Act III Sc.2 that Puck boasts to Oberon about what he has done:
My mistress with a monster is in love.
Near to her close and consecrated bower,
While she was in her dull and sleeping hour,
A crew of patches, rude mechanicals,
That work for bread upon Athenian stalls,
Were met together to rehearse a play
Intended for great Theseus' nuptial-day.
The shallowest thick-skin of that barren sort,
Who Pyramus presented, in their sport
Forsook his scene and enter'd in a brake
When I did him at this advantage take,
An ass's nole I fixed on his head: