We study families of orthogonal polynomials on the real line whose Stieltjes functions satisfy a Riccati type differential equation with polynomial coefficients. We derive discrete dynamical systems, obtained as a result of deformations of the recurrence relation coefficients of the orthogonal polynomials related to the above referred Stieltjes functions.