We study various aspects of three-term relations and their generalizations in solvable problem of mathematical physics. First, we consider Leonard pairs, pairs of matrices with the property of mutual tri-diagonality. We introduce and study a classical analogue of Leonard pairs and show that functions forming Leonard pairs satisfy non-linear relations of the AW- type with respect to Poisson brackets. Continuing this approach we introduce Leonard triples and describe an algorithm which leads to a chain of Leonard triples. Second, we introduce a family of non-Abelian nonlinear Kostant-Toda lattices in $GL_n$. We introduce some orbits with special parametrization, present evolution equation on these orbits and show that matrix Weyl functions can be used to encode the Hamiltonian structure of these lattices, to establish their complete integrability and to explicitly solve them via the matrix generalization of the inverse moment problem.