A common notion by many people is that the Mongol invasion of Europe was primarily stopped by the death of Ogedei Khan as Mongol tradition requires princes to be present for the election of a new Khan. How historically accurate is this? And what could have caused the Mongol withdrawal aside from the Khan's death?
Short answer? Not really.
Long answer? Ogedei's death led to the recall of Subutai and the Jochid faction to the Qurultai in Mongolia, yes, but what one often forgets is that the Mongol invasions of Hungary and Poland in 1241 were not the only time Mongols attempted to gain a stranglehold over Europe. A second Mongolian invasion was handily defeated by a reformed Hungarian military in 1285.
The truth is that Ogodei's death certainly drew attention away from the European theater, but the problems of further conquest in Europe were centered as much around political divisions with the Mongolian Empire, and possible logistical issues, as it was the diversion of the Mongol Empire at it's height. Frank McLynn does a good job of positing the latter issue in his book 'Genghis Khan: The Man Who Conquered The World'. Essentially, the huge herds of livestock that allowed Mongolian armies to be so supremely quick and self-sufficient would find little pasturage outside of the Carpathian Basin; the heavily forested and hilly German states presented a significant logistical issue for a huge cavalry force. Another factor is that the Mongolian armies were becoming hugely stretched; the archetypal 'Mongol' horsemen (that is, raised in the nomadic horse archery tradition associated with the Mongol Borjigid clan) was a rare sight even as early as 1241. The Mongolian Invasions of Russia utilised many Khitan, Crimean, Khazar, and Pecheneg auxiliaries (or their constituent tribes), and sending tens of thousands of fighting men across a continent was never going to be an easy task.
What we know of the Mongolians under Guyuk Khan, Ogodei's son and successor, was that the Ulus system had turned the Empire into a powderkeg, with Toluid and Ogodei factions picking allies to support their claims to the Khaganate. However, had Ogodei not been a chronic alcoholic, there is a strong possibility Europe would never have been conquered anyway. The reasons of imperial overstretch and potential logistical issues have been noted, but it also must be pointed out that the Mongols had a far more potential viable target to satisfy their nobility's desire for Appanages and land; Song China. McLynn argues the Song Chinese had a just claim to being the most prosperous and sophisticated civilisation on the planet in 1241. Under Mongke Khan and Kublai Khan, the Song Chinese were conquered by the Mongolian Empire, hugely increasing the wealth and population of their state. However, with it came a decisive move away from imperial unity; the Golden Horde centered in the far western steppe could no longer reliably call upon aid from the heartland of Mongolia. Their manpower recruitment pools became centered around the Caspian and Black Seas, drastically reducing the quality of their military forces.
Ogodei's death was not some great event that turned the entirety of history in another direction. Mongolian nobility rarely lived past 50 due to their near universal alcoholism. Europe had the problems of distance and supply to overcome, and by the time the Golden Horde had the will and the opportunity to invade, their military effectiveness had reduced as their opponents increased. The Hungary of 1285 was a united, hardened kingdom with a series of well-built fortresses and a determined military caste. If Ogodei had turned all the forces of the Mongolian Empire upon Eastern Europe in 1245, it is likely he would have conquered it. But the size of the empire, the political instability within it, issues of supply, and a far more promising target close to home prevented this. The Empire was colossal. Europe was a flourishing, vibrant place with culture and economic booms, but it was far smaller in scale and population than Song China.
History rarely turns upon the death of one man.
Edit: I checked my notes, and an important point I neglected to mention was that the Qurultai that elected Guyuk Khan didn't occur until 1246. The withdrawal of Mongolian forces had as much to do with Batu's decision to consolidate his powerbase in the Caucasus as it did as a direct response to Ogodei's death. This led to Subutai breaking from the Jochid faction in anger over Batu's decision not to continue into Europe.