This is a finding that keeps coming up, and I've certainly found it true in my life, but there's a significant chicken-and-egg problem in that depression frequently precludes the motivation to exercise, and if you don't already have a deeply-disciplined routine to overcome the lack of motivation, people won't do it. Exhortation to develop those good habits in the good times, I suppose.
You definitely want to build that habit when you're at your best.