Do you cover their cage at night? If possible, leave it uncovered, partially covered to let in a little light, or get them a night light. Complete darkness can worsen their night frights and increase the risk of them hurting themselves. Also, try to reduce any disturbances to their sleep as much as possible.
I personally find birds are more likely to get night frights if they've had a stressful day, so they may also just be caused by nightmares as well as getting spooked. I've seen my childhood dog bark in his sleep, so animals can certainly dream to a degree, just like us. I've heard cockatiels are more prone to night frights than other species. My budgies get them every now and then too.