Hi Jill-
There's lots of possible physiologic causes with the most common being neurologic activity during dreaming. Other possibilities include electrolyte, kidney, liver, etc. imbalances.
However, the true underlying cause is that it is a manifestation of her dynamic energy balance. If it is a new thing and if there is anything else going on, it may be a clue that a homeopath can use to help her re-balance.
It could be helpful if you give us some context like her age, BEAM, history (vaccinations, diet, medications...), etc.
Regardless, it's probably nothing to worry about, but if you are concerned then an exam from your local vet should help assuage any worries.