Martin Luther urged German peasants to rebel, but he switched sides and then urged the Northern German princes to massacre the peasants. There is good reason for this change. Luther knew that the Northern German princes were protecting him, and for Luther to be accused of aiding and abetting the peasants would be fatal to him.
Do you have any proof of this assertion? I'm sure your intention is to be truthful, but I think you are referring to Thomas Müntzer, not Martin Luther. Luther did not encourage a revolt, nor did he "switch sides". He actually admonished both sides to refrain from violence and encouraged a peaceful transition in German social conditions.
Actually, Luther encouraged peasants to revolt against their Catholic princes. However, when Luther realized that the peasants were taking what he was teaching and applying it to the political/social arena, he balked. Luther's teachings opened up whole can of worms, and not just in the spiritual realm. When one teaches that everything is up for grabs and that relativism rules, you are always asking for trouble. The peasants figured, if I can determine on my own what Scripture means and formulate my own doctrines, why wouldn't they think that they should no longer be ruled by a bunch of princes and continue to be tied to the land as serfs. If you can overturn 1500 years of established doctrine, why not fight against centuries of tyranny and injustice?
This is a well known fact. I teach it every year when I cover the Reformation and my textbook, which is used in the majority of history classes in the country, backs this up.