Abu Ayyub said that the Prophet used to wash his head when he was in the sacred state. Bukhari and Muslim.