The Prophet (ﷺ) said: When any of you dozes in the mosque (on Friday), he should change his place.
Sunan Abi Dawud Book 2, Hadith 730