There are three main ingredient to an excellent health.
Did you ever notice that your health over a period of few weeks is directly affected by what you consume as food? Healthy food generates positive energy and lifts your spirit up. Similarly, junk food gives rise to negative emotions and a feeling of lethargy. Guess what, your mind is quite similar in this regard. If you feed it a random diet coming from TV, Internet and social media, it will keep wandering in random directions. If you feed it with thoughts and opinions of great thinkers, it will build something positive by working on that in the background.
I have wondered why sometimes my mind is quite creative and generates interesting ideas on the projects I am working on. At some other times, it is wandering randomly or at best thinking only in a single dimension of the said project without any creative inputs. After a few trials and observations, I found that reading a range of books over a period of time (e.g., a few pages every day) keeps it agile and fresh. I discovered that abstaining from media is not enough to stimulate it. The mind must consume great thoughts to advance further what it has consumed. So while the idea seems simple, it has immense potential. Whatever you are working on, read unrelated but useful stuff to unleash its creative powers.