Lin-Manuel Miranda is Oscar-nominated for writing the “Moana” tune “How Far I’ll Go,” sung in the film by Auli’i Cravalho, who voices Moana, right. (courtesy of Disney 2016)

IF LIN-MANUEL MIRANDA wins an Academy Award this Sunday, many aspiring songwriters may take to their childhood bedrooms.

That’s where he went to get inspiration for “How Far I’ll Go,” the Oscar-nominated song from “Moana.”

“If I’m writing a teenage character and I need to connect with that angsty part of myself that feels like the future is forever away and everything is life or death, I can just go and lock myself in my childhood bedroom,” Miranda told such outlets as People magazine last year, while noting that his parents live just a few blocks away from him in New York.

Miranda wrote both music and lyrics for “How Far I’ll Go,” and collaborated with Mark Mancina and Samoan’s Opetaia Foa’i for the rest of the songs for “Moana,” which is also nominated for best animated feature. (The film’s digital release is tomorrow.)

To help craft that soundtrack, Miranda also drew inspiration for another animated Disney smash, “The Little Mermaid.” The “Hamilton” creator, who is scheduled to perform “How Far I’ll Go” on the Oscars broadcast, has said in interviews that he has strong memories of watching the Oscars for the first time in 1990 because “The Little Mermaid” was up for best song. He even named his son Sebastian as a nod to the film’s crab character, and has a hand in Disney’s announced live-action remake of “Mermaid.”

This weekend’s Oscars represent Miranda’s first shot at becoming the youngest person ever to achieve the career EGOT. Miranda already has won an Emmy to keep company with his Tony and Grammy awards, as well as his Pulitzer and MacArthur “genius” grant. At 37, Miranda is a year younger than the youngest person to achieve the four-Award feat: Another Disney songwriter, Robert Lopez (“Frozen’s” “Let It Go”), was 38 when he hit EGOT status, counting the Daytime Emmy.

But Miranda’s song will compete against not one but two “La La Land” tunes: “Audition (The Fools Who Dream)” and the film’s unofficial theme, “City of Stars,” which has to be considered the favorite. Also nominated are “Can’t Stop the Feeling” from “Trolls” (Justin Timberlake, Max Martin and Shellback) and “The Empty Chair” from “Jim: The James Foley Story” (Sting and J. Ralph).

Miranda’s best shot? Perhaps it’s that the twin “La La Land” tunes — both penned by Justin Hurwitz, Benj Pasek and Justin Paul — could split the vote. (Hurwitz is also the heavy favorite in the best score category.)

Miranda has said in interviews that his dream in writing for “Moana” was not to win Oscar, but rather to entertain his 10-year-old, “Mermaid”-loving self. He worked on his “Moana” music right when his Tony Award-winning “Hamilton” was becoming a sensation, and “How Far I’ll Go” became a moment of creative calm in the eye of the “Hamilton” hurricane.

Forever a fan of the House of Mouse, he’s working on yet another Disney film:  Next year’s “Mary Poppins Returns” is now shooting in London.

Read more:

Why ‘Moana’s’ main demigod looks so much — and so little — like People’s ‘Sexiest Man Alive’