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.
quran:39:9

Is one who is devoutly obedient during periods of the night, prostrating and standing ˹in prayer˺, fearing the Hereafter and hoping for the mercy of his Lord, ˹like one who does not˺? Say, "Are those who know equal to those who do not know?" Only they will remember ˹who are˺ people of understanding.  

Or is he who (read, softened, a-man) devotes himself ˹in worship˺, observing duties of obedience, in the watches of the night, ˹during˺ its hours, prostrating and standing, in prayer, apprehensive of the ˹eventuality of the˺ Hereafter, in other words, fearing its chastisement, and hoping for the mercy, the Paradise, of his Lord … ?, like one who is disobedient through disbelief or otherwise? (a variant reading has am-man, pronouncing the hamza, so that am has the sense of bal, ‘rather’). Say: ‘Are those who know equal with those who do not know?’, in other words, they are not equal, just as the person of knowledge is not equal to the ignorant one. Only people of pith, possessors of intellect, remember, ˹only they˺ are admonished.
القرآن:٣٩:٩

أَمَّنْ هُوَ قَانِتٌ آنَاءَ اللَّيْلِ سَاجِدًا وَقَائِمًا يَحْذَرُ الْآخِرَةَ وَيَرْجُو رَحْمَةَ رَبِّهِ ۗ قُلْ هَلْ يَسْتَوِي الَّذِينَ يَعْلَمُونَ وَالَّذِينَ لَا يَعْلَمُونَ ۗ إِنَّمَا يَتَذَكَّرُ أُولُو الْأَلْبَابِ  

{أمَّن} بتخفيف الميم {هو قانت} قائم بوظائف الطاعات {آناء الليل} ساعاته {ساجدا وقائما} في الصلاة {يحذر الآخرة} أي يخاف عذابها {ويرجو رحمة} جنة {ربه} كمن هو عاص بالكفر أو غيره، وفي قراءة أم من فأم بمعنى بل والهمزة {قل هل يستوي الذين يعلمون والذين لا يعلمون} أي لا يستويان كما لا يستوي العالم والجاهل {إنما يتذكر} يتعظ {أولوا الألباب} أصحاب العقول.