StarSolidStarSolidStarSolidStarOutline(3 stars)

I slept poorly after returning home from a screening of “The Night House.”

Insomnia is a strange way to make a plug for a film — though a plug is what this ultimately is — and one that, while fitting, requires some qualification. Director David Bruckner’s carefully calibrated hybrid horror story (one that teeters, mostly tantalizingly, between the psychological and the supernatural) takes place largely at night.

Sharply written by Ben Collins and Luke Piotrowski, the story focuses on the experiences of a woman whose husband has just killed himself. In the wake of her husband’s death, Beth (Rebecca Hall) starts seeing and hearing things, but her perceptions may be distorted by sleeplessness, grief and alcohol, to such an extent that she can’t tell the difference between dreams and reality. Are the noises she hears, the unseen presence she senses, and the electronics that come on at 4 a.m. signs of poltergeist activity, as they would be in almost any other film of this sort? Or are they symptoms of either sleep paralysis — the mind awake, but the body asleep — or its converse: somnambulism, or sleepwalking?

Those questions trouble the early scenes of the film, in a way that takes hold of you. But later, as “The Night House” shifts its focus, evolving from a metaphor for the sleeping brain to something more literal, and ultimately less satisfying, it nevertheless leaves you with other, darker thoughts. Thoughts that linger and take root, no matter how you try to shake them, and disturb your rest.

Hall is excellent as a college professor in Upstate New York whose husband Owen (Evan Jonigkeit, seen in flashbacks and apparitions) has just shot himself, in a rowboat on the lake next to the house he designed and built for them. Beth isn’t handling the aftermath of the tragedy well, believing she has received posthumous midnight texts from Owen, and seeing what appear to be bloody footprints on the dock in the morning. Her best friend Claire (Sarah Goldberg) and neighbor Mel (Vondie Curtis-Hall) have noticed: “You’re not well,” Mel tells her.

Soon though, there is firmer evidence of a deeper, more earthly mystery: Beth discovers photos on her husband’s phone of several women, all of whom look a little like her, but not quite. And then there are Owen’s notebooks, filled with architectural renderings of a mirror image of their house, along with other disturbing notations. There is a creepy talisman, and, as the film’s title hints, more architectural oddities.

For much of “The Night House,” Bruckner constructs a seductive maze of false starts, dead ends and dark hallways, both the literal and the metaphorical kind, as Beth probes these enigmas. Cinematographer Elisha Christian is particularly adept at rendering the kind of shadowy boogeyman figures that haunt the wee hours but turn out to be just that: shadows in a dark corner (or furniture and architectural details that, when viewed from the wrong angle, appear as people). Prepare yourself to be on sustained edge, because “The Night House” will play you like an out-of-tune violin. It left my nerves more jangled than I can recall in a long time.

It is in this foggy realm — one that will be familiar to anyone whose sense of reason has been fried by fatigue, lateness and/or worry — that the film’s strengths lie. Beth’s confusion is palpable, and her inability to think her way out of it genuinely terrifying.

But gradually, in pursuit of an explanation other than Beth’s own lying eyes, the film ventures into territory that is familiar for another reason: because it is so often fallen upon by lesser horror films. To wit: a literal — if incorporeal — bugaboo, the kind that has plagued and marred many an otherwise impeccable, even artful, horror film, as this one is. (The excellent “Hereditary” and “The Witch” also suffered from endings that overly relied on supernatural silliness.)

Still, despite this weakness, “The Night House” is a pretty watertight ship, and if it turns in the direction of paranormal waters, it does so with a sure hand on the tiller and an intriguing premise that keeps its flaws from sinking it. Calling it intriguing is actually selling it short. Warts and all, “The Night House” is, in the truest sense of the word, kind of haunting.

R. At area theaters. Contains some violence, disturbing images and coarse language, including some sexual references. 107 minutes.