Hadith 113B

قَالَ مَالِك ، فِي رَجُلٍ وَجَدَ فِي ثَوْبِهِ أَثَرَ احْتِلَامٍ ، وَلَا يَدْرِي مَتَى كَانَ ، وَلَا يَذْكُرُ شَيْئًا رَأَى فِي مَنَامِهِ ، قَالَ : لِيَغْتَسِلْ مِنْ أَحْدَثِ نَوْمٍ نَامَهُ ، فَإِنْ كَانَ صَلَّى بَعْدَ ذَلِكَ النَّوْمِ ، فَلْيُعِدْ مَا كَانَ صَلَّى بَعْدَ ذَلِكَ النَّوْمِ ، مِنْ أَجْلِ أَنَّ الرَّجُلَ رُبَّمَا احْتَلَمَ وَلَا يَرَى شَيْئًا ، وَيَرَى وَلَا يَحْتَلِمُ ، فَإِذَا وَجَدَ فِي ثَوْبِهِ مَاءً فَعَلَيْهِ الْغُسْلُ ، وَذَلِكَ أَنَّ عُمَرَ أَعَادَ مَا كَانَ صَلَّى لِآخِرِ نَوْمٍ نَامَهُ ، وَلَمْ يُعِدْ مَا كَانَ قَبْلَهُ
Imam Malik, may Allah have mercy on him, said that if a person finds a trace of a wet dream on his clothes and does not know when the wet dream occurred, nor does he remember seeing anything in his dream, then he should perform ghusl (ritual bath) from the last dream he remembers. If he performed any prayers after that dream, he should repeat them, because sometimes a person experiences a wet dream but does not see anything, and sometimes he sees something but there is no wet dream. So when he sees wetness, ghusl becomes obligatory for him. The reason for this is that Sayyiduna Umar bin Khattab, may Allah be pleased with him, repeated only the prayer after his last sleep, and did not repeat the prayers before that.
Hadith Reference موطا امام مالك رواية يحييٰ / كتاب الطهارة / 113B
Hadith Takhrij «شركة الحروف نمبر: 104، فواد عبدالباقي نمبر: 2 - كِتَابُ الطَّهَارَةِ-ح: 83»