Abu Hurairah (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "If anyone sits in a gathering where he does not remember Allah, he will bring grief upon himself (on the Day of Resurrection), and he who lies down in a place where he does not remember Allah, will bring grief upon himself (on the Day of Resurrection)."[Abu Dawud].
App reference: Book 5, Hadith 24
Arabic/English book reference: Book 5, Hadith 837