Musnad Ahmad 570
It was narrated that `Abdullah bin Nujayy said:
`Ali said: There was a time before dawn when I would ask to enter upon the Messenger of Allah (ﷺ). If he was praying, he would say Subhan Allah to me, and that was my permission to enter; if he was not praying, he would give me permission to enter.
حَدَّثَنَا أَبُو سَعِيدٍ، حَدَّثَنَا عَبْدُ الْوَاحِدِ بْنُ زِيَادٍ الثَّقَفِيُّ، حَدَّثَنَا عُمَارَةُ بْنُ الْقَعْقَاعِ، عَنِ الْحَارِثِ بْنِ يَزِيدَ الْعُكْلِيِّ، عَنْ أَبِي زُرْعَةَ، عَنْ عَبْدِ اللَّهِ بْنِ نُجَيٍّ، قَالَ قَالَ عَلِيٌّ كَانَتْ لِي سَاعَةٌ مِنْ السَّحَرِ أَدْخُلُ فِيهَا عَلَى رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَإِنْ كَانَ قَائِمًا يُصَلِّي سَبَّحَ بِي فَكَانَ ذَاكَ إِذْنُهُ لِي وَإِنْ لَمْ يَكُنْ يُصَلِّي أَذِنَ لِي‏.‏