Weird nightmares

My 15 month old has been in our bed with us lately as well put her down for a nap and she’ll end up screaming or crying.

Last night we had the cot next to our bed and she was awake from 12-3am and would fall asleep then randomly whimper in her sleep and wake up crying

Has anyone else’s LO done this??