It is narrated from Sayyiduna Ibn Abbas and Sayyidah Aishah (may Allah be pleased with them) that the Prophet (peace and blessings be upon him) stayed in Makkah for ten years during which the Qur'an was being revealed to him ((peace and blessings be upon him)), and in Madinah for ten years during which the Qur'an was being revealed to him ((peace and blessings be upon him)).
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10680