36 Raka’at – A distinction of the people of Madina
وَقَال الشَّافِعِيَّةُ : وَلأَِهْل الْمَدِينَةِ فِعْلُهَا سِتًّا وَثَلاَثِينَ ؛ لأَِنَّ الْعِشْرِينَ خَمْسُ تَرْوِيحَاتٍ ، وَكَانَ أَهْل مَكَّةَ يَطُوفُونَ بَيْنَ كُل تَرْوِيحَتَيْنِ سَبْعَةَ أَشْوَاطٍ ، فَحَمَل أَهْل الْمَدِينَةِ بَدَل كُل أُسْبُوعٍ تَرْوِيحَةً لِيُسَاوُوهُمْ ، قَال الشَّيْخَانِ : وَلاَ يَجُوزُ ذَلِكَ لِغَيْرِهِمْ . . وَهُوَ الأَْصَحُّ كَمَا قَال الرَّمْلِيُّ لأَِنَّ لأَِهْل الْمَدِينَةِ شَرَفًا بِهِجْرَتِهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَمَدْفِنِه-
Translation: The Shafa‘ee Fuqaha say that the people of Madina offered 36 Raka’at of Taraweeh. This is because 20 Raka’at of Taraweeh has 5 breaks. The people of Makka perform 1 round of Tawaaf after each break. The people of Madina started offering another 4 Raka’at in each break to become equal to the people of Makka in virtuous acts. This is not allowed for anybody apart from the people of Madina. This is the most correct ruling as Allama Ramli says: Because the Holy Prophet's (Sallallahu alaihi wa sallam) migrated to Madina and His sanctuary also is in Madina, the people of Madina are distinguished from others.
(Al Maus‘ooatul Fiqhiya Al Kuwaitiya, Vol 27, Pg No: 143)
It has been established by the rigorously-authenticated (Sahih) Hadith that Hadhrat ‘Umar (May Allah be well pleased with him), Hadhrat ‘Uthman (May Allah be well pleased with him), Hadhrat ‘Ali (May Allah be well pleased with him) used to offer 20 Raka’at of Taraweeh and in the eras of their caliphate, it was also the custom of the Muslim Ummah. More than that, the Sahabah had arrived at a consensus about this as understood by the explanations given by the Imams, Fuqaha, etc. In general, in the Muslim world including in Makka and Madina, this is what is followed.