Stop drinking alcohol, as said elsewhere. It takes about 2-3 weeks of sobriety to regain 80% of the capacity you lost. It's also extremely hard on your emotional regulation, work motivation, patience, and ability to concentrate long after you think you can't feel the effects.
Stop eating carbs, namely because it makes you sleepy and unmotivated. I replaced carbs with tons of fiber and vegetables, like red cabbage, matchstick carrots, and expensive fermented foods. Don't try to imitate your old crappy diet. Stop trying to eat the best meal every night.
Perfect your sleep schedule. I used 10mg EXTENDED RELEASE melatonin about 1 hour before bedtime.
Fight less with your spouse, play boardgames.
Meditate or stare at the wall to learn how to be bored. A lot of "intelligence" is just tolerance for boring/temporarily unrewarding things. Meditation has a lot of benefits as far as clearing out some of the crud.
Exercise, even 5 minutes a day. Anything.
Make sure to work in a variety of settings. If you can take your computer to a park bench and use your phone as a wifi hotspot, great. Being in nature is speculated to improve brain health.