Image copyright Waitress Musical Image caption Bareilles will step into the musical's title role for six weeks from 27 January

When Sara Bareilles signed up to write the music and lyrics for the Broadway musical Waitress in 2013, she had no idea it would change her life.

The show - which tells the story of a pregnant, pie-baking waitress - became a smash hit, and saw Bareilles nominated for Tony and Grammy awards.

It also introduced her to her partner, actor Joe Tippett, and legendary musician T Bone Burnett, who produced her latest, Grammy-nominated album.

Now, she's making her West End debut in the show's title role, which she'll play for six weeks from 27 January.

"I really talk about my life in categories - before Waitress and after Waitress," Bareilles tells the BBC. "I can't imagine life without it."

Based on Adrienne Shelly's 2007 film, the musical was a departure for the singer, who'd previously scored hits with autobiographical pop ballads like Love Song and Brave.

"Writing for Waitress was like an exercise in empathy," she says, "because you would have to find your way into the psychology of a character who felt far away from you.

"Earl, the abusive husband, is a good example: I had to try to understand him so I could give him a song that's not meaningless."

The experiment worked: Critics embraced the show's "joyously life-affirming celebration of love and friendship" and praised Bareilles for writing "one of the best scores in years".

But writing for the stage and appearing on it are very different challenges, as Bareilles discovered when she first played Jenna Hunterson in the Broadway production three years ago (replacing Jessie Mueller, who originally played the role).

"The first time I played Jenna, I was very attentive to the business of the show - the props, and the technical aspects - because it was all brand new," she explains.

"So when I got to go back into the show, I felt so grateful to be able to settle into something that felt like deeper storytelling to me."

Bareilles eventually played Jenna three times on Broadway, with each stint prompting a surge in box office receipts. When she was first announced in the role, the musical sold $1.2 million in tickets in a single day.

Image copyright Waitress Musical Image caption Sara Bareilles and Gavin Creel previously played Jenna and Dr Pomatter on Broadway last year

For her UK run, she will be reunited with Tony and Olivier Award-winner Gavin Creel (The Book Of Mormon, Hello Dolly!), who plays Jenna's gynaecologist and love interest Dr Pomatter.

However, Bareilles said they won't simply be recreating their Broadway performances.

"The environment has changed, the country has changed, I imagine it will feel different," she says.

"I've had another year's worth of life experience between the last time I did the show and now, so I imagine those things will infuse themselves into the work in a really beautiful way."

'Surprise incontinence'

In the interim, the singer-songwriter has released a Grammy-nominated album, Amidst The Chaos, and worked with Star Wars director JJ Abrams on a new TV show, Little Voice, which will debut on Apple TV this summer.

"Our first season is done, we're in mixing and post-production now," says the star.

"It's about a young songwriter in New York City - I write all the music for her - but it was really an homage to that early stage when you're just beginning as an artist, playing for crowds for the first time, and being rejected by record labels... All of the juicy bits!"

Bareilles has also released an EP of songs that were cut or discarded during the writing process for Waitress - including Knocked Up You, whose lyrics list the side-effects of pregnancy, from acid reflux and backache, to haemorrhoids and "surprise incontinence".

She described the mini-album as a "little gift to fans" who were mourning the show's closure on Broadway (the final performance was on 5 January).

"We have had the most amazing fan community for this show," Bareilles says. "They're ravenous in the most incredible, beautiful way. It was a long road to get to where we ended up, so we wanted to share some of that music."

And could the musical of the movie go full circle and become a movie again?

"I would love to see that happen, absolutely," says Bareilles. "And I'm already working with JJ Abrams, so I've got somebody to call!"

Waitress is playing at the Adelphi theatre in London.

Follow us on Facebook, or on Twitter @BBCNewsEnts. If you have a story suggestion email entertainment.news@bbc.co.uk.