My core solution is pretty simple: do various things to ensure I get a good night's sleep (which for me is 7.5 hours without waking up) and take a 20-minute nap in the afternoons. If I do these two things, my mind feels stronger for longer, more often at its best. If I don't, it can feel weak and drained and distracted.
I have also found eating less sugary foods tends to help, as does exercise, though I can't see as direct a impact on brain energy as sleeping and napping.
I suspect there's a lot more I could do. The brain consumes a great deal of a person's energy, perhaps even more dramatically for folks like me (and I suspect many on HN) whose minds are always buzzing with thought all day long, and I'd like to find more ways to "feed" it on a day to day basis.
So I ask you fellow hackers: what sleep, food, exercise, or other habits have you found to be most effective in fueling your day-to-day brain power?