I've had similar experiences after heavy workouts. It puts me in a better mood but my cognition feels like 50%. I assumed it was due to blood diversion from the brain to the muscles.
I experienced this in marathon training and researched it. It is the body’s reaction to the oxygen needs of your body being prioritized over that of your brain to keep your muscles firing. If you are pushing yourself in running and try to do math problems in your head you will find your math ability degrades as you continue your run.
But my cognition the next day seems improved if I go to the gym.