I don't know what the Buddha said about cleanliness, but here is a section of a Dhamma talk(Title :- Walking the Forest Path) given to monks at Wat Pah Nanachat by Ven. Ajahn Nyanadhammo which deals with a similar issue. Here it goes...
During this rains retreat, this is a chance to develop the mind, as a community as a group and individually when you are alone in your hut. But to do that we need to be aware of being very very mindful, keep everything very clean and impeccable. Do things well neatly and tidily. When you walk into your room if you want to know the state of your mind, open the door of your kuti,your hut and look in and look in as if you were Ajahn Chah looking in on that hut. What would Ajahn Chah say about the state of your hut? Look in.. And you'll find all the forest meditation teachers say that the outer reflects the inner and if your hut is neat and tidy and impeccable, clean and orderly then that shows that ahh! you have enough awareness and mindfulness on the outer you can turn now to the inner. But if the outer world is sloppy, messy, dirty, untidy, then that shows that there is a coarseness of mind there. your not able to even maintain those physical things around the body in a refined way, that's what we need to work on first. But usually as western people we're in a great hurry. We think "That's not important, that's so petty, I want the higher dhammas, I want the highest truth, I'm after enlightenment". And I remember Ajahn Chah one time gave a very strong talk to the monks because they weren't keeping their huts tidy. He said "Yes, you want to go off with your bowl and robes and climb mountains and go into caves in search of enlightenment, your in search of NIbanna seeking out Nibbana, but you can't keep the toilet clean. And you allow those tuk-eirs those big lizards to drop droppings in the toilet and the lizard doesn't clean it up and you don't clean it up and you don't clean it up after you use the toilet and then you go off saying I'm searching for Nibbana I want Nibbana ". We can't clean the toilet. I remember distinctly that talk because it was a very heavy talk, was a very direct talk. It left an impression on the mind. because he was saying that this is what's close to home, look what's close to home, look at your very home, look in the room that your living in, how's it kept, what's that reflect, is my mind like that? is my mind messy? is my mind not orderly? is my mind dirty? cluttered? untidy, or is my mind open free? clean? neat? looking for purity! looking for what is stable and good! because they reflect each other. And whatever monastery,any good monastery that you go to in the forest meditation tradition, this is the training your expected, that will be expected of you, this is what the Kruba Ajahn's will say. It's very interesting when you go and stay with the forest meditation teachers, just about very dhamma talk they ever gave, it would start off with the mundane, start off talking about the korwat(monastic rules), talking about whether your jong krom path(walking meditation path) is swept. talking about how you clean your huts, how you look after your bowl and robes, the daily life. the things close to us, the things that are happening here and now, it's only then do they give those progressive teachings to those higher states. talking about those things near to us, right at home.
With Metta and