After getting all 120 stars and using the cannon to get to the top of the castle, if you walk around enough at the highest point you will fall through the roof and into a hidden dimension of the front wall. Going through the door itself will not let you escape, so you must jump through the wall to reach the outside.
Mario has an idle animation that changes the longer you go without touching a button. First he just stands there looking around. After a while, he stretches his hands and yawns, at which point he will sit down and lower his head as he begins snoring and sleeping. Leave him alone longer, and he will then lay down on his side and continue sleeping. Leaving him longer still, and he will suddenly let out an even louder snore, and begin talking in his sleep. He says various Italian foods, sighs happily, and finishes with a Mamma Mia before stopping. He will continue to lay there and snore, occasional talking in his sleep again, until a button is pushed at which point he hops up like nothing happened.