Abu Hurayrah (may Allah be pleased with him) reported that the Prophet (may Allah's peace and blessings be upon him) said: "When the end of time draws near, the dream of a believer can hardly be false, and the dream of a believer is one part from forty-six parts of prophet-hood." In another narration, the Prophet (may Allah's peace and blessings be upon him) said: "Those of you who have the most truthful dreams are those who are the most truthful in speech."
عن أبي هريرة -رضي الله عنه- مرفوعاً: «إذا اقترب الزمان لم تَكَدْ رؤيا المؤمن تكذب، ورؤيا المؤمن جزء من ستة وأربعين جزءا من النبوة». وفي رواية: «أصدقكم رؤيا، أصدقكم حديثا».
شرح الحديث :
The dreams of believer at the end of time are true. It may be a dream about something that is happening in real life, or something that is going to happen, and then it happens exactly as in the dream. So, such a dream is considered like prophetic revelation in the truthfulness of its content or indication. "The dream of a believer is one part from forty-six parts of prophet-hood", i.e. from the parts of prophetic knowledge, considering that it includes information about the unseen. Prophet-hood is gone but its knowledge remains. The number forty six was specified because the age of the Prophet (may Allah's peace and blessings be upon him) in the soundest narrations was sixty-three at the time of his death. His prophetic mission lasted for twenty-three years, as he was sent with the message of Islam at the age of forty. For six months before the start of his mission, he used to see good dreams (visions), which would come true as clear as daylight. Then he saw the angel (Jibrīl) while awake. So, the ratio of the period of revelation received in dreams (six months) to the duration of his prophet-hood (twenty-three years) is one half to twenty three, which is equal to one part to forty six parts. His statement: "Those of you who have the most truthful dreams are those who are the most truthful in speech", means that if the person is truthful in his speech and close to Allah, then his dreams are mostly closest to being true. This is why he specifically mentioned the righteous in the narration of Al-Bukhāri: "A good dream comes from a righteous man." As for the one who is not truthful in his speech and commits sins openly and secretly, then his dreams are mostly the result of the devil manipulating his mind. Ibn al-Qayyim (may Allah have mercy upon him) said: "Whoever wishes to have truthful dreams, then he should be truthful and eat from lawful earnings while observing Allah's commands and prohibitions, and let him go to sleep in a state of purification and face the Qiblah and say Dhikr until he falls asleep. If he does so, his dreams will hardly ever be false.”