Hi, I'd like to help you with your question.
It is very common developmentally for children to have dreams such as your daughter is having. In children, these are usually called night terrors and are different from the nightmares you and I might have. Adults also get night terrors, they are just much more rare. Although the cause of these episodes are not yet known, doctors think they may be due to HGH- human growth hormone. This shows up during growth periods and since ages 2 to 5 is an important developmental time for children, night terrors are common.
If your daughter is not showing any other signs of being distressed and is doing fine during the day, there is nothing to worry about. But if you start seeing signs of any unusual behavior during the day, then take your daughter to a therapist for an evaluation.
But in most cases, these episodes are nothing to worry about. Most children outgrow them eventually.
I hope this helps you,