When Alison Brie was in middle school, her grandmother, who was schizophrenic and homeless, was knocked down by a car and left in a coma. “My family didn’t have the resources to care for her,” Brie says. “And she lived on the street.” On a visit to the hospital, she remembers struggling to connect the dirty homeless woman in the bed with a photo at home of her grandparents on their wedding day – “Dancing, looking beautiful, radiant.”

Brie, 37, who has alert, glacier-bright blue eyes, tells this moving story with unrehearsed candour. Talking publicly about her grandmother is still a fresh experience, and raw, but it’s also cathartic. For a long time, these were conversations she had only with her mother, but that time is over. Her new film, Horse Girl, now on Netflix, is a fiction, but one that mines her grandmother’s story for a twisting meditation on mental illness with a mischievous coda: just because someone is schizophrenic doesn’t mean the aliens aren’t real.

On shows like NBC’s Community and the Netflix series Glow, Brie has won accolades for her comic instincts. Horse Girl initially feels like a quirky indie vehicle for those same reflexes, alternating between whimsical scenes in a craft store, where her character, Sarah, works by day, and awkward interactions with Sarah’s roommate, Nikki, by night. But then the film’s mood shifts and darkens. Sarah’s grip on reality becomes increasingly untethered. She begins to obsess about the story of her mentally ill grandmother. Unaccountable nosebleeds and sleepwalking stints spiral into wild conspiracy theories involving alien abduction and cloning. By the end, the audience is left to connect the dots between the real and the imagined.

Facebook Twitter Pinterest Latest role: Alison Brie draws on her experience with her grandmother for Horse Girl.

Co-written by Brie and director Jeff Baena, Horse Girl seems to relish ambiguity and defy easy categories. The review site, Rotten Tomatoes, classifies it as a “comedy, drama, science fiction and fantasy”, which seems about right. In online forums it has elicited acres of head-scratching analysis. Brie can live with that. “Once you release art into the world, I think the fun part is letting it speak to people in the way it speaks to them,” she says. “Then it’s theirs as much as it is yours.”

We are sitting in the dining room of New York’s Whitby Hotel, beneath the frozen gaze of a brass parakeet perched in a chandelier above us. Brie, who is in the midst of making a new movie, Happiest Season, directed and co-written by Clea DuVall, had spent the previous night filming in Pittsburgh. As a result, she has motored through the day on 40 minutes’ sleep, avoiding the temptation of a catnap.

My grandma thought the house was bugged and her children were spies

“If I’d sat down for 15 minutes, I was going to pass out,” she says. Instead, she is here, sipping tea with honey and lemon, and giving an excellent impression of someone who can think of no better place to be, despite the bed waiting somewhere above our heads. This, after all, is also a measure of success – not just award shows and parties, but the schlep of interviews, the 6am hunt for the departure gate, or, as at the Sundance Festival in January, having to change in an airport toilet for a red-carpet premiere. “There’s something very humbling about being, like, ‘Then I ran into this little room where someone just took a shit and stood on my own jeans so that I wasn’t standing on the bathroom floor,’” she says, laughing.

Sundance marked the first time Brie watched Horse Girl with an audience, a moment of validation. Afterwards people wanted – needed – to tell her their own mental-health stories. “It was very emotional,” she says. “I just felt really proud and grateful.” But the opinion she cared about most was her mother’s. “Through this whole process of making it, the conversation I had with my mum after her seeing the film was the most intimate,” she says. “There have been some conversations I feel are too personal to share, but also some things that my mum suddenly opened up about that I had never heard before, and that were much darker than I realised.” Brie worried that perhaps the film had “rattled something open” in her mother’s head, a trauma that she had wanted to forget. “She was shaken, but she doesn’t seem upset with me about it.”

Facebook Twitter Pinterest ‘Studying drama was my opportunity to be the freest I had ever been’: Alison Brie wears trousers and jacket by Area, top by Norma Kamali, shoes by Schutz, rings by Ananya, Lady Grey and Pamela Love. Photograph: Daniel Dorsa/The Observer

Most of us look to our grandparents to help inform and make sense of our own identities. For Brie, that narrative is scrambled by mental illness. “My grandmother thought that the house was bugged and that her children were spies,” she says. In the 1960s, when her grandmother began displaying signs of schizophrenia, treatment was haphazard and shrouded in shame. “She was medicated by a doctor who gave her uppers to wake up in the morning and downers to go to bed,” Brie says. Her uncle – the youngest of four children, and subjected to physical abuse – was the first to be taken into care; her mother and a younger sister soon followed.

“The effects of this trauma spider-webbed its way down through the whole family,” Brie says. “At the same time, my mum had a very intense loyalty to her own mother, so that was traumatic for her as well.” She marvels at her mother’s resilience. “I’m going to cry talking about it,” she says, and pauses to steady herself. “Often I’ll stop and think, ‘I can’t believe the things she went through, and how she turned out to be such a wonderful mum.’”

Although Horse Girl is inspired by her grandmother, the narrative is shaped by another question that has gnawed at Brie’s consciousness: what if she begins to act abnormally too? Would she be aware she was slipping into schizophrenia? How would she be able to distinguish between what was real and what was not?

“Right before we started writing the movie, I went through a deep depression unlike any I had experienced,” she says. “I would just sit there sobbing, even though everything was fine. Nothing had happened.” In fact, by any normal measure life could hardly be better. She had recently married actor Dave Franco, and had just wrapped the second season of Glow. She was being nominated for awards. It “came out of nowhere,” she says. “That’s when I started to get irrationally angry at my own DNA, and started to think, ‘This is just in me, I can’t even control this. This is brain chemistry.’”

Facebook Twitter Pinterest Breakthrough part: as Trudy Campbell (right) in Mad Men with Elisabeth Moss and Vincent Kartheiser. Photograph: Everett Collection Inc/Alamy Stock Photo

Brie resisted medication for her depression, but did take up therapy. That helped, but it also informed the writing of Horse Girl: what would happen to someone who did not have the money for therapy, or the supportive husband, or a network of friends? The question became the spark for her character Sarah’s spiralling crisis. In the movie’s most disturbing scene, a new romance curdles as Sarah realises her date has merely been humouring her manic chatter about aliens and clones. In that moment she has never been more alone.

While Horse Girl came out of Brie’s meditation on her family history, the parallels only go so far. Sarah is tentative, lonely and awkward. Brie describes her teenage self as wildly confident. “I just somehow always knew who I was,” she says. “I hear about so many people feeling very awkward in high school – and I didn’t. I loved high school, because I was in drama, and I had my drama friends.”

Long before Brie was plucked from obscurity for a small role that morphed into a big role in Matthew Weiner’s star-making nostalgia trip Mad Men, Brie had a comic routine called Edible Wiener, which she performed for her parents and their friends. She was still at elementary school at the time. “I would put on one of my parents’ trench coats and then I would get a hotdog and put it between my legs,” she says. “I’d waddle out into the living room and I’d be, like, ‘Are you ever hungry walking down the street, and don’t have something to eat? Try our new edible wieners!’”

Every parent knows that children can be simultaneously lewd and innocent, but the anecdote also illuminates a strain of absurdity that has supercharged Brie’s career. “The tagline was: ‘It’s your wiener but you can eat it!’,” Brie adds. “I feel like we had such a fascination with sex when I was nine and 10, but we had no idea what sex was.”

Facebook Twitter Pinterest ‘I gave myself permission to step out of my comfort zone’: Alison Brie wears dress by Rosie Assoulin, boots by Jimmy Choo and rings by Jennifer Fisher and Ananya. Photograph: Daniel Dorsa/The Observer

Edible Wiener was Brie’s signature skit, but ribald humour was her high-school speciality. She thinks early exposure to cult auteur John Waters – through his 1990 movie Cry Baby – may have planted the seed. “My sketches were always slightly perverted,” she confesses. On sleepovers with her best friend, Deborah, she developed a one-woman video series, Cute E Nurse. “It was about a slutty nurse who had sex with all the doctors,” she says. Brie played all the characters while her friend recorded the action. “I’d be humping the air as the doctor,” she recalls. “Then I would flip over and be humping the air as Cute E Nurse. I don’t why I was so sexual as a kid, but I just found it really funny.”

My first role was Toto. On all fours the whole show. I had a lot of barks

Brie describes a magical semester studying at the Royal Scottish Academy of Music and Drama in Glasgow – the sheer freedom of it. “It was my opportunity to be the freest I had ever been,” she says. “I gave myself permission to step out of my comfort zone – putting in earphones and dancing down the street, full force, to Stevie Wonder.” She remembers a fellow student asking, “Are you like this at home?” and realising that she had always been, as she puts it, a ham. When it wasn’t Edible Wiener and Cute E Nurse, it was musicals with the Jewish Community Center in Los Feliz, LA, where she grew up. “My first role was Toto,” she says. The dog? The very same. “On all fours for the whole show,” she says. “I had no lines, but I had a lot of barks.” Her mother sewed the costume together, adding knee pads to withstand the floor.

Success after college came swiftly. Brie was working in a theatre show in Ventura County, California, when she got booked on Mad Men. “I had done an episode of Hannah Montana, and a terrible horror movie called Born,” she says. For Born she played a 21-year-old virgin who gives birth to a demonic foetus that sends her on a blood-letting rampage. So: thank you Matthew Weiner. “Mad Men was meant to be one episode, with the possibility of becoming a recurring character,” says Brie. “I was like, ‘That’s fine, I’m excited.’ But by the end of that episode, they had asked me to come back for the next. Then I did every season of the show.”

Facebook Twitter Pinterest ‘I’ve felt incredibly empowered by the physical work we do on the show. It’s been the greatest experience of my career’: on playing Ruth Wilder (left) in Glow. Photograph: Pictorial Press/Alamy Stock Photo

Her career has been on a roll ever since. She was still making Mad Men when she was cast in Community as Annie Edison, and still making Community when she was cast in BoJack Horseman, the animated alt-comedy about the perils of fame, starring a horse as a sitcom has-been. Among the characters Brie voices on the show (including Princess Diana) is series mainstay Diane Nguyen – a Vietnamese-American writer and third-wave feminist living with her husband, a yellow Labrador named Mr Peanut Butter. Despite these absurdities, the show is among the most acutely perceptive studies of what might be called our contemporary condition on television. The sixth and final season landed on Netflix in January. “I’ve been so lucky to have been on these shows that have these real cult followings,” says Brie. But her attachments are temporary. “I’m happy to say goodbye to a character,” she says. “They run their course. There were seven seasons of Mad Men, I did six seasons of Community. I definitely felt ready to release Annie.”

Now she has begun shooting the final season of Glow, a show she considers the most significant project of her life outside of Horse Girl and which has an almost entirely female cast. A show about women’s complicated friendships, it feels like the much-hyped changing of the guard that Hollywood and the entertainment industry has been promising us. “It’s been the greatest experience of my career,” Brie says, and clearly means it. “I’ve felt incredibly empowered by the physical work we do on the show. I’ve been inspired by all the women around me.” It has also given her the opportunity to flex her creative muscles in other ways. She directed an episode in season three, and will direct another for season four. “The most challenging part was trusting I had the knowledge and experience,” she says. “It’s forced me to empower myself in new ways.”

With at least three other movies heading to the big screen this year – Happiest Season, Promising Young Woman, an #MeToo revenge fantasy, and horror flick The Rental, the directorial debut of her husband – this feels like a pivotal year for Brie. But she has learned not to get complacent. “Life is just this constant work in progress,” she says. “Every time you’re on the upswing, you think, ‘I’ve figured it out, I’ve finally found the key to all joy and will never lose it again.’” She closes her eyes, lets out a sigh: “And that’s how you end up blindsided.”

Horse Girl is on Netflix now