David Lowery spent much of last summer feeling sick to his stomach. The director was so nervous about shooting A Ghost Story that he filmed it in secret. “I was very aware of falling flat on my face,” he says. “It was such a high-wire concept. I went into it thinking it would be fun, a liberating bout of creative experimentation. But it was terrifying. I was so riddled with self-doubt I probably aged five years.”

Lowery is now grinning from ear to ear, though. He can talk about his fears because A Ghost Story has neither sunk his career nor made him a laughing stock – although you can understand his anxiety. On paper, the film’s “high-wire concept” looks bonkers: it’s Casey Affleck wearing a white bedsheet. He looks like Casper the Friendly Ghost or the phantom emoji come to life. “On set, I kept waiting for someone to call me out, to raise their hand and say, ‘This looks stupid.’ I’m glad no one did, because my confidence was already shot.”

A Ghost Story is difficult to categorise: eerily beautiful, dreamily melancholic, earnestly sincere and patience-testingly slow (I watched it sitting next to a man who could barely contain his exasperated harrumphs). The film ranks low for scares – it’s more likely to keep you up at night fretting about the meaning of life than to make you terrified of a spirit under the bed. A recent article in this paper included it in cinema’s latest big thing: post-horror.

Affleck plays C (the film is too cool for actual names), a musician who lives on the outskirts of Texas with his wife M, played by Rooney Mara. A few minutes in, he is killed in a car crash. At the morgue, Lowery holds the camera still, observing C’s body covered in a white sheet. We watch and watch – until C simply sits up on the slab and walks out, wearing the sheet.

It’s funny, until it’s not. The image of ghost Affleck trudging home, sheet dragging in the mud, is piercingly sad. Back at the house – unlike Patrick Swayze in Ghost – he is unable to communicate with his partner. So he becomes a silent witness to her grief. Time passes, the world moves on, and he is trapped in the house contemplating eternity.

Lowery, 36, wrote the first draft in a single day last spring. Having directed Mara and Affleck in his breakthrough film, 2013’s outlaw tale Ain’t Them Bodies Saints, he asked them to “make this weird little movie in Texas”. Actually, he texted Affleck, explaining that the role would involve wearing a white sheet. Affleck replied: “Sure.” Lowery says he doesn’t think Affleck even read the script until he showed up on set. “Casey likes to do weird, strange things. I don’t think he cared so much how it would turn out.”

Outlaws united … Rooney Mara and Casey Affleck in Ain’t Them Bodies Saints.

But is it Affleck under the bedsheet? Because, let’s face it, it could be anyone. “Yes,” Lowery nods earnestly. All the time? “Not always. We had to reshoot a bunch of scenes and he wasn’t available. But he was upset. He begrudgingly bequeathed the sheet.” The costume is more complicated than it looks. Under his bedsheet, to get the shape right, Affleck is wearing a hoop skirt and tulle petticoats.

The star does perform some Oscar-worthy mumbling before he dons the sheet, but the big performance comes from Mara as the grief-stricken widow. The scene everyone’s talking about is a five-minute, uninterrupted take in which she eats an entire family-size pie slumped on the kitchen floor, then runs to the loo to throw up. “You’ll never look at pie the same,” screamed USA Today. Given Mara’s tremendous presence throughout, it’s a bit of a shame that so much attention has been given to the fact that it was the first pie she’d ever eaten. What kind of pie was it, sweet or savoury? “Sweet,” says Lowery. “It was chocolate but had a very low sugar content. One of my producers is a vegan chef.”

It’s the scene he’s most proud of, he says, its purpose being to avoid any revelling in grief. “I haven’t lost a partner, Rooney hadn’t either. We didn’t want to be grief tourists or to capitalise on an experience that is real for many people.” He gave Mara a copy of The Year of Magical Thinking, Joan Didion’s account of coping with the death of her husband, John Gregory Dunne. “The thing I remember from the book was the way in which Didion’s grief would manifest itself in the most mundane moments. Eating felt like the right thing.”

I started piling on fears. I felt everything was meaningless

Lowery is as striking as his film – shaved head, laser-bright blue eyes – though sadly his giant handlebar moustache is no longer in evidence. He’s friendly and up for talking about anything. Where, I ask, did this interest in mortality and the enormity of time originate? He laughs. “I was having an existential crisis. I felt everything was meaningless.”

The trigger, he says, was a Pulitzer-prize winning article by Kathryn Schulz in the New Yorker about an earthquake that scientists believe will take out a sizeable chunk of northwest America. “It freaked me out,” he says. “I started piling on other fears: the political situation in the US and all over the world. I was not feeling optimistic about the future of mankind. I felt the world was on its way to ending. The film became my way of dealing with those issues.”

Lowery is regarded as one of the most promising film-makers of his generation, A Ghost Story being the fifth movie he has directed. Ain’t Them Bodies Saints, his third, gave him indie-level fame and led to a bizarre offer from Disney – to remake Pete’s Dragon, the 1970s kids’ fantasy. He started filming A Ghost Story last June, two days after finishing Pete’s Dragon, using his Disney pay cheque to partially cover the $150,000 budget. Friends chipped in the rest.

Bizarre offer … Lowery’s remake of Pete’s Dragon. Photograph: Disney

His interest in supernatural beings and bedlinen goes way back: at the age of seven, he moved to Texas, where his dad still works as a theology professor at the University of Dallas. It was around then that he decided to become a film-maker, his first foray being a remake of Poltergeist, which he hadn’t seen (“my parents wouldn’t let me watch it”). It starred one of his brothers wrapped up in a sheet.

Lowery never expected, nor even hoped, that the world would ever see his films. Success seems to have taken him by surprise. “I knew I would carry on making strange little independent films that would maybe play at festivals,” he says. “I sort of resigned myself to toiling in some degree of obscurity. I certainly did not envisage making a Disney movie. The most I hoped for was to be able to pay my bills. I was not a go-getter. I was very type-B.”

A Ghost Story opened with a small release in the US, but spread to 400 cinemas. Does he worry that someone will walk in expecting something akin to Patrick Swayze and a pottery wheel? Lowery nods and gives one last grin. “The marketing has been very clear about what the movie is,” he says. “But I have no doubt that at some multiplex in America right now, someone is very angry that they just spent $15 and assumed they were getting a horror film.”