Hadithcore
Mishkat al-Masabih, 2272

Abu Huraira reported God’s messenger as saying, “If anyone sits in a place where he does not remember God, deprivation will descend on him from God; and if anyone lies down in a place where he does not remember God, vengeance will descend on him from God.” Abu Dawud transmitted it.

وَعَنْ أَبِي هُرَيْرَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ قَعَدَ مَقْعَدًا لَمْ يَذْكُرِ اللَّهَ فِيهِ كَانَتْ عَلَيْهِ مِنَ اللَّهِ تِرَةٌ وَمَنِ اضْطَجَعَ مَضْجَعًا لَا يذكر الله فِيهِ كَانَ عَلَيْهِ مِنَ اللَّهِ تِرَةٌ» . رَوَاهُ أَبُو دَاوُدَ

References1 variant
In-Book Reference
Book 9, Hadith 47