Praise be to Allah
Al-Bukhaari (2593) and Muslim (2770) narrated that ‘Aa’ishah (may Allah be pleased with her) said: When the Messenger of Allah (blessings and peace of Allah be upon him) wanted to travel, he would cast lots among his wives, and whichever one’s name was picked, he would take her with him.
This was due to his (blessings and peace of Allah be upon him) perfect fairness among his wives (may Allah be pleased with them) and his kindness towards them.
With regard to the way in which the casting of lots was done by the Prophet (blessings and peace of Allah be upon him), we have not come across anything that describes it clearly in any hadith, but the scholars have stated that he used to write the names of the people among whom lots were being drawn on leaves or the like, and put them in his lap, or in a vessel, then he would tell someone to take out one leaf, and the one whose name was drawn was the one who would be chosen.
Al-Haafiz Ibn Hajar (may Allah have mercy on him) said:
The way in which drawing lots was done was that the names would be written on things, and a stranger would make the draw; the one whose name was drawn was the one who would be chosen.
End quote from Fath al-Baari (1/172). See also: al-Haawi by al-Maawardi (16/254)
There is nothing in Islamic teaching to specify a particular way of drawing lots, so however it is done is permissible.
Az-Zarkashi (may Allah have mercy on him) said:
However lots are drawn is permissible. End quote.
Sharh az-Zarkashi ‘ala Khuraqi (7/455)
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
However lots are drawn, it is permissible, because there is no particular prescribed way of doing it. So reference should be made to whatever people agree upon. End quote.
Ash-Sharh al-Mumti‘ (2/55)
For more information, please see the answer to question no. 102446.
And Allah knows best.