Did the boy's night terrors serve any purpose other than to add a creepy red herring, so we kept thinking we were seeing a ghost and it turned out to just be him? Also the fact that his night terrors were getting worse was apparently a sign that the whole family was being affected by the strange events. But I thought they would come into play more.
When there was ten minutes left and they hadn't come up in a while, I was wondering if the night terrors might somehow make it harder for his sister to kill him at the end.
I think they were just to creep people out, as you say, and fill the time hole. There's a lot of horror movies out there that probably would have been better without the extra 30+ minutes of crap that everyone complains about, but the thing is, you can't get movie theatre show time with a movie that's too short. People will complain that it wasn't worth their buck, because it was simply too short. It's this mentality that drives bad movies to get ridiculously long amounts of crap that has nothing to do with anything, much like in An American Haunting, and The Conjuring.
During the beginning, before we see ghost children and learn they are in fact dead, I was under the impression that the young detective/investigator/whatever his title may be (besides Officer So and So), I came under the impression that the young cop was a survivor of one of the films, and that we'd find out the old cop from the beginning was the kid from the first movie, etc... Basically we'd find out just how deep the rabbit hole goes, because the kids who went missing eventually assumed new identities and became the secondary characters, and we don't find this out until the end of the movie in a twisted reveal... But then we find out that the old cop proves no purpose other than to be the antagonist sheriff novelty character, we find out the young cop proves no purpose other than to be Deus Ex Machina, etc. 2 hours of story that could have been done in 60 minutes, and all it really does is become a wound on the roof of your mouth that bothers you for the rest of the night.
I think it was a mis-direct. I figured quite early that the missing child was the killer in each case and though (because the ghost was getting to him with the night terrors) it was going to be the boy. So it was a surprise at the end when it was the girl. I feel that they got me in the way they intended.
Think it was a red herring to surprise viewers like Purple_Grant said, the terrors make people think the boy is involved to throw suspicion off of Ashley
Horror movies often have stuff like that that just feels undevelopped to add tension and just ends up being annoying. I just look past it in general. Although as someone already suggested it might also have been a mislead. I also thought it might have meant the boy was the one being possessed and my boyfriend and I actually made a bet on which kid was going to be the missing one at the end haha ! ...and yeah I lost.