Shakespeare's "The Tempest" is a very magical play.
Prospero speaks these lines just after he remembers the plot against his life and sends the wedding masque away in order to deal with that plot.
The sadness in the tone of the speech seems to be related to Prospero’s surprising forgetfulness at this crucial moment in the play: he is so swept up in his own visions, in the power of his own magic, that for a moment he forgets the business of real life.
How important are our "little lives" - and how will we be remembered?
WE ARE SUCH STUFF AS DREAMS ARE MADE ON
Our revels now are ended. These our actors,
As I foretold you, were all spirits, and
Are melted into air, into thin air;
And, like the baseless fabric of this vision,
The cloud-capped towers, the gorgeous palaces,
The solemn temples, the great globe itself,
Yea, all which it inherit, shall dissolve;
And, like this insubstantial pageant faded,
Leave not a rack behind. We are such stuff
As dreams are made on, and our little life
Is rounded with a sleep.
"The Tempest" (IV.i.)