I have found that working out in the morning is very good for my productivity. I've written a blog post about it:
https://medium.com/better-humans/50c835e15244
The keys for me were doing so for only 10 minutes, with 2 of those being very intense, otherwise you get too exhausted.
I've lost 15lbs in 3 months also. By working out in the morning you get over the cortisol peak, grogginess and get off to a good start.
I need to finish that blog post series, but I'm actually working on a mobile app to help me keep track of some data.
To manage those energy/focus swings (especially after lunch), instead of working out, I go for a walk or step outside the office to work with fresh air and some sunlight.