What do you do to keep your mind sharp? When I started at university I could perform with a fresh mind all of the time -- doing a problem set all weekend without reduced performance.
A couple of other students and myself seemed to be several times faster and have larger working memories than others. I made quick work of my studies. 

Now that I have gotten to the ripe old age of 22, I seem to be in perpetual brain fog, and even coffee does not bring me back to my original abilities.
 This disturbs me because I want to go to graduate school.

What do you professors do (especially those who do mostly research) to keep your brain able to function near peak for 40+ hours a week? Are you simply stupider than you were at 18 but abuse coffee and persist in your research anyway?
A very important thing that took me most of graduate school to understand is that my self-perception of "getting dumber" was not caused by actually degrading abilities, but by a qualitative change in the type of work that I was trying to do.  I discovered this through a passage of despair, when I felt so brain-fogged and useless that I decided that I was going to simply ignore my thesis for a few days and work on a meaningless side project instead---which I blazed right through at the rate I remembered from undergraduate days, because it was all much simpler and more well-defined than doing research.

In undergraduate education, one may be working very hard indeed, but the type of work is also extremely specialized in an unusual way.  In particular, almost all of the work that you are called on to do in your courses (undergraduate or graduate) is:


Designed to be accomplishable within a fixed number of hours
Tightly dependent on the most recent things that you have learned


This puts a huge (and hidden) amount of constraint on the search space for answers: in essence, if you have learned good "student meta-skills," you are likely to be very good at picking the right place to go searching for your answers.  When you stop taking undergraduate classes, this skill becomes largely irrelevant, and you can start feeling like you are much "dumber" simply because you're thinking that progress on poorly defined and unbounded problems should come at the same rate as progress on pre-digested course work.

I would thus say that the first and most important thing to do is to come to this understanding, that the types of skills you now need are qualitatively different than the ones you most exercised as an undergraduate.  Digesting that may cure your concern right there.

Beyond that, my basic recommendations are simple:


Do things that you are interested in.
Let yourself read, but also make sure you write and do technical work.
Keep a record of all of your accomplishments, so that you can look at external evidence of non-failure when you're having an imposter syndrome day.