I think your question refers to Bottom's soliloquy in Act IV Scene 1 when he wakes up after the four lovers have been discovered in the woods by Theseus and Hippolyta. He has had his head of an ass removed, and we see him reflecting on what has happened to him.
A key theme throughout the play and one picked up throughout this scene, both with Bottom and with the lovers, is the relationship between reality and illusion and how we can discern the difference between them. Bottom, reflecting on what has passed, realised that his dream was "past the wit of man, to say, what dream it was." His experience was so fantastical that words don't have the power to communicate it. Indeed, Bottom continues, men are asses if they try to explain the dream. Not every event can be explained rationally, and some things are better off remaining in the realm of imagination and fantasy. Human senses are incapable of capturing such realities ("The eye of man hath not heard, the ear of man hath not seen, man's hand is not able to taste, his tongue to conceive, nor his heart to report, what my dream was"). Only literature has the power to capture such dreams, which is why Bottom will have Quince write a ballad of his dream.
The reason for this ballad being called "Bottom's Dream" is because it has "no bottom", perhaps reflecting that works of literature have no bottom - that is, they cannot be quantified, measured or understood solely through the means of logic. Our impressions of a play or novel or poem do not stay static - they change, and there are as many different interpretations of a work of literature as there are people. Shakespeare here therefore is perhaps reflecting on another key theme - that of the conflict between reason and imagination.