While the best approach depends on what theory you want to test, my general advice is to consider how covariates affect the interpretation of slopes. In your diagram:
- the $a$ path (
Mediator ~ IV
) is a simple regression slope (expected change in Mediator per 1-unit increase in IV)
- either $b$ path (
DV ~ Mediator
) is a partial regression slope (expected change in DV per 1-unit increase in Mediator, given IV)
If you regress out additional covariates from any Mediator/DV, then your slopes will likely change ($a$ becomes partial, $b$s are still partial but with additional effects partialed out) and their effects would be interpreted similarly, but given (additional) covariates. That is, statistically equating people on gender, income, and depression (or the thought experiment "holding those values constant").
Now, when you interpret your indirect effects ($a \times b$), you would like to have an unambiguous interpretation regarding whether that is the effect to expect for given levels of covariates. If you only regress either Mediator or DV(s) on covariates, then it gets ambiguous because only $a$ or $b$ has that interpretation. So my intuition says to always regress all endogenous variables on the same exogenous covariates, although there could certainly be theoretically justifiable exceptions to that rule of thumb.