Allah's Messenger said: "All of the earth is a Masjid except for the graveyard and the washroom."
Jami` at-Tirmidhi Book 2, Hadith 169