The Global Reset Theory had appeared as soon as episode one aired. In this theory, it is assumed that the world shown during the dream sequence (at the beginning of episode one) was either a parallel world or a previous instance of the current world. In this text, we will be referring to the older instance of the world (the "dream world") as the Old World, and the current instance (the "real world") as the Real World.
This theory stipulates that, for some reason, the Old World has been destroyed. Post-episode one speculations were that Kyuubey was evil and probably was linked to said destruction. Episode two brought a new possible cause. As is commonly believed at this point of the story (episode 2), magical girls and witches might be the same, in that sense that witches might be "fallen magical girls". As shown during the episode, upon killing a witch, a magical girl's seed gets muddier, and the only way to clean it is to use the witch seed. So, a theory is that a magical girl that didn't clean their seed for too long might be turned into a witch. The Old World might just be an instance of a world where witches outnumbered magical girls and brought chaos and destruction to the world.
Whatever the cause of destruction might be, the point of this theory is that the world actually was at the brink of destruction. As we all know, a magical girl can have one wish granted when she makes her contract. So the most commonly admitted possibility is that Madoka, upon seeing the horror of the Old World, accepted to become a magical girl and wished for the world to be restored.
Another possible interpretation is that it is not Madoka that wishes for the world to be restored, but Homura instead. This theory would explain why Madoka doesn't remember anything aside from her strange dreams, while Homura clearly remembers both her and Sayaka. The reason why Homura seems mad at Madoka could also be explained as a remnant from the Old World, where Madoka possibly made horrible things.
While the reset theory is the most accepted, other opinions have risen as well. Some suggest that the dream Madoka had could have happened just a few days prior to the first episode, where Madoka first met Kyubey and Homura by accidentally walking into a witch world. Later, Madoka thought it was just a dream and forgot about it, but Homura realized that Madoka is now in danger of becoming contracted with Kyubey, so she transfers schools to prevent it. Another possibility is that the dream is a premonition of the future, and that the events could happen as soon as episode 3 where Madoka could make a wish to obtain magical girl powers. Let us see that last one more in detail.