We have been ordered to take care of our bodies because they are given to us by Allah and we shall return them (after death) in the best shape possible. We do sports, work out, swim, run, etc., and that aligns with what Allah has ordered us regarding this topic.

Now in the same context. What methods/strategies are there (in Quran or sunnah) that motivate or describe to the Muslims or to the humanity in general why and how to take care of one's own brain?

I am a software engineer and my brain is my most valuable asset. I have been through so many discussions but none of them came from Islamic background or view point. I am convinced that Islam is a way of life that has answers for everything we might encounter, but don't seem to figure this one yet.