Al-Adab Al-Mufrad, Book 50, Hadith 1219 (English)

Ibn 'Abbas reported that the Prophet, may Allah bless him and grant him peace, said, "Whoever goes to sleep with grease on his hand before washing it off and is afflicted by something should not blame anyone except himself."

حَدَّثَنَا أَحْمَدُ بْنُ إِشْكَابَ، قَالَ‏:‏ حَدَّثَنَا مُحَمَّدُ بْنُ فُضَيْلٍ، عَنْ لَيْثٍ، عَنْ مُحَمَّدِ بْنِ عَمْرِو بْنِ عَطَاءٍ، عَنِ ابْنِ عَبَّاسٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ‏:‏ مَنْ نَامَ وَبِيَدِهِ غَمَرٌ قَبْلَ أَنْ يَغْسِلَهُ، فَأَصَابَهُ شَيْءٌ، فَلا يَلُومَنَّ إِلا نَفْسَهُ‏.‏

sunnah.com