There is a sense in which the motif of dreaming is explicitly related to one of the central themes of the play, which is love and infatuation. This scene concerns primarily the restoration of the Athenian lovers, Bottom and Titania to their "proper" states, as Puck has finally managed to sort out the chaos that he caused, ensuring that Demetrius is in love with Helena, Lysander with Hermia, and Titania is now back in love with Oberon. Poor Bottom has his head removed and is restored to the real world of Athens out of the magical forest that has bamboozled him so greatly. However, note what Oberon says to Puck about what has happened to all of these enchanted figures when he gives Puck his instructions:
And, gentle Puck, take this tranformed scalp
From off the head of this Athenian swain,
That he, awaking when the other do,
May all to Athens back again repair,
And think nor more fo this night's accidents
But as the fierce vexation of a dream.
Infatuation then can be seen as a "fierce vexation of a dream" that distorts our senses and makes us do ridiculous things, all in the name of love. Note what Demetrius says about his former love for Hermia:
But by some power it is--my love to Hermia,
Melted as the snow, seems to me now
As teh remembrance of an idle gaud
Which in my childhood I did dote upon...
Infatuation then is shown to overpower us, distort our senses, and rule our minds, even when this results in ridiculous scenarios when we show ourselves to be fools. The play seems to be best summed up by Puck's wry comment, "What fools these mortals be." We show ourselves to be fools by the way that love impacts us.