Shakespeare uses the bones and structure of the myth as a base for the humor of this scene. He presents the mechanicals (Bottom and Quince, etc) as bad actors who don't know their parts very well, and who also have to improvise to create different elements of the myth. The wall and the moon, for instance, are played by actors rather than just being the inanimate objects that they are in the myth. The story is the same, the plot follows the same lines, but Shakespeare uses the inefficiency and inadequacy of the actors to create more of a ridiculous and humorous tone.