  Some chemically peculiar stars in the upper main sequence show rotational
period variations of unknown origin. We propose these variations are a
consequence of the propagation of internal waves in magnetic rotating stars
that lead to the torsional oscillations of the star. We simulate the
magnetohydrodynamic waves and calculate resonant frequencies for two stars that
show rotational variations: CU Vir and HD 37776. We provide updated analyses of
rotational period variations in these stars and compare our results with
numerical models. For CU Vir, the length of the observed rotational-period
cycle, $\mathit\Pi=67.6(5)$ yr, can be well reproduced by the models, which
predict a cycle length of 51 yr. However, for HD 37776, the observed lower
limit of the cycle length, $\mathit\Pi\geq100$ yr, is significantly longer than
the numerical models predict. We conclude that torsional oscillations provide a
reasonable explanation at least for the observed period variations in CU Vir.
