  In this paper we present a method to obtain deformations of families of
matrix-valued orthogonal polynomials that are associated to the representation
theory of compact Gelfand pairs. These polynomials have the Sturm-Liouville
property in the sense that they are simultaneous eigenfunctions of a symmetric
second order differential operator and we deform this operator accordingly so
that the deformed families also have the Sturm-Liouville property. Our strategy
is to deform the system of spherical functions that is related to the
matrix-valued orthogonal polynomials and then check that the polynomial
structure is respected by the deformation. Crucial in these considerations is
the full spherical function $\Psi_{0}$, which relates the spherical functions
to the polynomials. We prove an explicit formula for $\Psi_{0}$ in terms of
Krawtchouk polynomials for the Gelfand pair
$(\mathrm{SU}(2)\times\mathrm{SU}(2),\mathrm{diag}(\mathrm{SU}(2)))$. For the
matrix-valued orthogonal polynomials associated to this pair, a deformation was
already available by different methods and we show that our method gives same
results using explicit knowledge of $\Psi_{0}$.
  Furthermore we apply our method to some of the examples of size $2\times2$
for more general Gelfand pairs. We prove that the families related to the
groups $\mathrm{SU}(n)$ are deformations of one another. On the other hand, the
families associated to the symplectic groups $\mathrm{Sp}(n)$ give rise to a
new family with an extra free parameter.
