The brain has its own cleanup system that works best during deep sleep. While you sleep deeply, this system flushes out harmful proteins like amyloid and tau that can build up and cause problems.
Strong evidence supports this claim and little argues against it.