Whenever the Messenger of Allah ﷺ intended to set out on a journey, he would draw lots among his wives, and whichever of them was chosen by the lot, the Messenger of Allah ﷺ would take her with him... the hadith continues.
كان رسول الله ﷺ إذا أراد أن يخرج أقرع بين نسائه، فأيتهن خرج سهمها خرج بها رسول الله ﷺ معه… الحديث.
Bukhari narrated it in the tafsir (4750) and Muslim in the tawba (56:2770), both through Yunus, from Zuhri, who said, Urwa bin Zubayr, Saeed bin Musayab, Alqama bin Waqqas, and Ubaydullah bin Abdullah bin Utba bin Masud informed me about the story of Ayesha , the wife of the Prophet ﷺ, when the people of the slander said what they said about her, and Allah cleared her of what they said. Each of them related to me a portion of the story, and their accounts confirmed one another, though some of them retained it better than others. What Urwa related to me from Ayesha, I have mentioned in full.