Abi al-Abbas al-Bakri said: Ibn Jarir, Ibn Khuzaymah, Muhammad ibn Nasr al-Marwazi and Muhammad ibn Haroun al-Rawayni were traveling in Egypt, their food ran out, they had nothing left and felt so hungry. They gathered one night in a house where they used to take as shelter, and agreed to draw lots to decide who would ask people for food. The lot fell on Ibn Khuzaymah, and he said to his friends: give me some time to pray. Al-Bakri said: He hurried to pray, and suddenly a group of people carrying candles nocked on the door, they were sent by the ruler of Egypt. They opened the door. They asked the four men: Which of you is Muhammad ibn Nasr? They said: Here he is. They gave him fifty dinars. Then, it was said: Who is Muhammad ibn Jarir? And they gave him fifty dinars, and they did the same with al-Rawayni and Ibn Khuzaymah. Then they said to the four of them: The ruler was sleeping yesterday and he saw in a dream that the four Muhammads are hungry, so send them money. He pleads to you that if you run out of money to send one of you to him to get more.
Reference: Sair Alam al-Nobala' (11/167)