Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
abudawud:4400Yūsuf b. Mūsá > Wakīʿ > al-Aʿmash > Ayḍ Ḥattá Yaʿqil > al-Majnūn Ḥattá Yufīq

“... . Till he reaches puberty , and a lunatic till he is restored to consciousness.” ‘Umar then began to utter: Allah is most great.  

أبو داود:٤٤٠٠حَدَّثَنَا يُوسُفُ بْنُ مُوسَى حَدَّثَنَا وَكِيعٌ عَنِ الأَعْمَشِ نَحْوَهُ وَقَالَ أَيْضًا حَتَّى يَعْقِلَ وَقَالَ وَعَنِ الْمَجْنُونِ حَتَّى يُفِيقَ قَالَ

فَجَعَلَ عُمَرُ يُكَبِّرُ  


See similar narrations below:

Collected by Dārimī
darimi:3072Muḥammad b. ʿĪsá > Ḥammād b. Zayd > Maṭar al-Warrāq

[Machine] Umar and Ali, loyalty to the elder.  

الدارمي:٣٠٧٢حَدَّثَنَا مُحَمَّدُ بْنُ عِيسَى حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ قَالَ سَمِعْتُ مَطَرًا الْوَرَّاقَ يَقُولُ قَالَ

عُمَرُ وَعَلِيٌّ «الْوَلَاءُ لِلْكُبْرِ»