Amir bin Rabia reported,

We were with the Prophet ﷺ on a journey during a dark night, and we could not tell the direction of the qiblah, so each one of us prayed facing whichever way he was. When morning came, we mentioned this to the Prophet ﷺ, and the verse was revealed, "So wherever you turn, there is the face of Allah" [Baqarah 2:115].

Tirmidhi 345

Daif

حدثنا محمود بن غيلان حدثنا وكيع حدثنا أشعث بن سعيد السمان عن عاصم بن عبيد الله

عن عبد الله بن عامر بن ربيعة عن أبيه قال

كنا مع النبي ﷺ في سفر في ليلة مظلمة فلم ندر أين القبلة فصلى كل رجل منا على حياله فلما أصبحنا ذكرنا ذلك للنبي ﷺ فنزل {فأينما تولوا فثم وجه الله}

الترمذي 345ضعيف
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Prayer
Chapter
A man praying toward other than the qibla when it is cloudy
Numbering
Darussalam 345
Tirmidhi 345