In this paper, we investigate geometric conditions for isometric immersions with positive index of relative nullity to be cylinders. There is an abundance of noncylindrical $n$-dimensional minimal submanifolds with index of relative nullity $n-2$, fully described by Dajczer and Florit cite{DF2} in terms of a certain class of elliptic surfaces. Opposed to this, we prove that nonminimal $n$-dimensional submanifolds in space forms of any codimension are locally cylinders provided that they carry a totally geodesic distribution of rank $n-2geq2,$ which is contained in the relative nullity distribution, such that the length of the mean curvature vector field is constant along each leaf. The case of dimension $n=3$ turns out to be special. We show that there exist elliptic three-dimensional submanifolds in spheres satisfying the above properties. In fact, we provide a parametrization of three-dimensional submanifolds as unit tangent bundles of minimal surfaces in the Euclidean space whose first curvature ellipse is nowhere a circle and its second one is everywhere a circle. Moreover, we provide several applications to submanifolds whose mean curvature vector field has constant length, a much weaker condition than being parallel.