Hi J.,
Has your daughter been exposed to scary movies or images? If so, it needs to stop. Some kids sure do have active imaginations, and it can get the better of them.
When she has these, do you turn her light on? Maybe a light will wake her out of them. If that doesn't work, try something wet or cold. If it's cold outside, you may try to take her out on your front porch or out the back door. Or, you may even want to try a wet, cold wash cloth on her face.
Neither one of my kids have had this happen to them, so I'm not sure of what else to say. These are just some ideas I think I'd try if it were me.
Hope I've helped. Good luck and God bless you, ls