Mallory, a documentary filmmaker, and her boyfriend Alex retreat to a cabin in the Laurentian Mountains to address parasomnia. At the suggestion of Dr. Snape, Mallory films Alex's sleep patterns to monitor his condition. Alex is hesitant to comply, but reluctantly agrees when Dr. Snape warns that there have been recorded instances of people with parasomnia killing their partners in their sleep. The first night of their stay, Alex speaks to Mallory in his sleep, cryptically stating “He's under the house.” The following morning, he claims to have no recollection of this.
As Alex exhibits increasingly violent behavior during his episodes and continues alluding to an unknown presence in the house, Mallory does more research on parasomnia and shows Alex a photo of a Cthulhu-like entity, asking if it resembles the entity he sees in his dreams. She also learns of a therapist named Dr. Armitage who specializes in the treatment of parasomnia and suggests that they contact him. When Alex refuses, Mallory meets with Dr. Armitage alone via video call. He claims that Alex's episodes are not actually caused by sleepwalking, but by being possessed by an entity known as Phobetor, also called the “Eater of Dreams.” Mallory dismisses Dr. Armitage's concerns as delusions, and Alex is furious to discover she contacted him without his knowledge.
Mallory implores Alex to tell her more about his traumatic childhood, but he refuses. She calls his adopted sister, Tammy, who confides that his birth mother, Catherine Thorne, was a member of a cult. Doing more research, Mallory learns that Catherine was part of a cult that worshiped Phobetor, became pregnant with Alex via rape, and murdered six people, including Alex's father, shortly before she gave birth to him. She shares her findings with Alex, who berates her for digging into his past without permission and accuses her of exploiting his trauma and condition so she can use it for a documentary. Becoming increasingly paranoid, Mallory insists they leave tomorrow, but Alex admits that he is starting to like the cabin and has spoken to the owners to extend their stay for an additional week, to Mallory's chagrin.
In the middle of the night, Alex has another episode in which he destroys the kitchen and angrily demands that Mallory stop filming him. When she recounts this to Dr. Armitage, he points out that Alex being aware that she was filming contradicts her belief that he is in a dissociative state during his episodes. Dr. Armitage explains that the cult of Phobetor sought to create a vessel for the entity, which would become fully possessed by him upon turning thirty; a terrified Mallory says Alex's thirtieth birthday is that day.
Now fully possessed by Phobetor, Alex chases Mallory around the house. She hides in the closet and stabs him in self-defense when he finds and attacks her. The real Alex returns to his body as a distraught Mallory calls 911 for help, insisting that it is too late for him and imploring her to let him die. When Mallory says she can't lose him, Alex replies, “You'll never lose me” before bleeding to death on the floor.
Some time later, Mallory's filmmaking partner leaves her a voicemail as she takes a pregnancy test, expressing condolences for the loss of Alex but encouraging her to create a film with the footage she has of him. Mallory checks the result of the test and sees that it is positive. A naked, bloodied Alex suddenly appears in her doorway, reiterating “You'll never lose me,” and she screams in terror.