Dynamic optimisation
The Dynamic Programming ("Bellman' Equation") formulation incorporates the terminal boundary condition ("transversality conditions") needed in case we use the Lagrangian/Euler equation formulation. The initial conditions are still needed in both approaches. 

To see why, consider the problem

$$\text{max}_{\{x_t\}} \sum_{t=0}^{\infty} \beta^t U(c_t)$$

$$s.t.\;\;\; a_{t+1}= (1-r)a_t + w - c_t, \;\;\; a_0 \; \text{given}$$

Solving the budget constraint for $c_t$ and inserting into the objective function, we have compactly

$$\text{max}_{\{a_{t}\}} \sum_{t=0}^{\infty} \beta^t U(a_t, a_{t+1}),\;\;\;\; a_0 \; \text{given}$$

where we treat the stock variable next period as our decision variable.
Now for the optimal sequence, $a^*_{t+1}$ must solve the following problem:

$$\max_y \big[U(a^*_t, y) + \beta U(y, a^*_{t+2})\big],\;\;\; y\;\; \text{feasible given}\;\; a^*_t$$

In the words of Stokey and Lucas "a feasible variation on the sequence $\{a^*_t\}$ cannot lead to an improvement on an optimal policy".  

Then we get the first order conditions (differentiating with respect to $y$ essentially)

$$U_2(a^*_t, a^*_{t+1}) + \beta U_1(a^*_{t+1}, a^*_{t+2}) =0$$

where the subscripts $1,2$ denote partial derivatives. This is a second-order difference equation, and so it requires two boundary conditions. We have already one of them, the given initial value of wealth $a_0$. We need one more, hence the terminal, "transversality" condition. 

In contrast, using the Dynamic Programming approach we arrive at a first-order difference equation, and we do not need an additional boundary condition.

For the full exposition, see Stokey &amp; Lucas p. 97-100.