Your daughter is having "night terror". This usually happen to children age 3 - 8. Unpleasant events during the day can induce it. It usually happen between 1/2 hour to 3 hours after falling asleep, during the non-REM sleep cycle. For children medications are not recommended. They usually outgrow it when they reach adolescence. But if it happens at regular time every night, you can try to wake her up 15 minutes before it happens, then let her go back to sleep after a few minutes.