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.
tirmidhi:3436Abū Salamah Yaḥyá b. al-Mughīrah al-Makhzūmī al-Madanī And Ghayr Wāḥid > Ibn Abū Fudayk > Ibrāhīm b. al-Faḍl > al-Maqburī > Abū Hurayrah

When a matter would worry the Prophet ﷺ, he would raise his head up toward the sky and say: “Glory is to Allah, the Magnificent (Subḥān Allāhil-ʿAẓīm).” And when he would strive in supplication; he would say: “O the Living, O Sustainer (Yā Ḥayyu yā Qayyūm).”  

Abū ʿĪsá said that this Ḥadīth is Ḥasan-Gharīb.
الترمذي:٣٤٣٦حَدَّثَنَا أَبُو سَلَمَةَ يَحْيَى بْنُ الْمُغِيرَةِ الْمَخْزُومِيُّ الْمَدَنِيُّ وَغَيْرُ وَاحِدٍ قَالُوا حَدَّثَنَا ابْنُ أَبِي فُدَيْكٍ عَنْ إِبْرَاهِيمَ بْنِ الْفَضْلِ عَنِ الْمَقْبُرِيِّ عَنْ أَبِي هُرَيْرَةَ

أَنَّ النَّبِيَّ ﷺ كَانَ إِذَا أَهَمَّهُ الأَمْرُ رَفَعَ رَأْسَهُ إِلَى السَّمَاءِ فَقَالَ سُبْحَانَ اللَّهِ الْعَظِيمِ وَإِذَا اجْتَهَدَ فِي الدُّعَاءِ قَالَ يَا حَىُّ يَا قَيُّومُ  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ