Nate Freiman remembers the late nights of the 2004 playoffs. He was a senior at Wellesley High School in Massachusetts, and balancing schoolwork with watching the Boston Red Sox became more and more challenging, both for students and faculty.

“My teachers pretty much stopped giving homework after Game 4 of the ALCS,” said Freiman, the new first baseman for the Portland Sea Dogs.

Game 4, of course, is when Boston beat the Yankees to keep the ALCS going.

“Then really, after Game 5, is when everyone stopped focusing on schoolwork. We just watched the series.”

A Red Sox fan who visited Fenway Park “quite a few times,” Freiman wouldn’t mind returning there, this time using the players’ entrance.

Maybe the idea of Freiman playing for Boston is remote, at least this season, but the thought of him returning to the major leagues is not.

He has celebrated two playoff berths with the Oakland A’s – spraying champagne alongside friend Brandon Moss – in 2013 and 2014.

But baseball success is fickle. As quickly as he got to the majors, Freiman found himself out of affiliated baseball two seasons later. Earlier this month, he was playing for the independent Long Island Ducks.

The Red Sox signed Freiman, 29, on May 10 and assigned him to the Sea Dogs, a team needing offense, experience and a first baseman. Freiman, who stands 6-foot-8, fits right in.

“Very professional,” Portland Manager Carlos Febles said. “He has a plan at the plate. Good defender. Great personality. Great in the clubhouse.”

And if anyone needs help with their calculus, Freiman is a qualified tutor.

“I don’t give hitting lessons or baseball lessons at camps. I give math lessons in the offseason,” Freiman said. “Just something I’ve enjoyed doing.”

And if it’s golf lessons you need … Freiman’s wife is a pro golfer.

Freiman attended Duke University, where he played baseball while majoring in history, with a minor in math. He became friends with former Sea Dogs outfielder Alex Hassan – “he stayed with me during his recruiting trip.”

After Freiman’s junior year, in 2008, the Texas Rangers drafted him in the 28th round. He was appreciative, but said no.

“I had the opportunity to graduate from Duke. It was going to take a lot for me to leave after my junior year,” Freiman said.

Besides a degree, Freiman had others reasons to stay.

At Duke, he was friendly with another history major. Amanda Blumenherst could not only match his GPA (3.8), but she more than stood out in athletics – as a three-time NCAA Women’s Golfer of the Year and the 2008 U.S. Women’s Amateur champion.

After graduation, Freiman played pro ball – he was an eighth-round pick of the Padres – while Blumenherst made it on to the LPGA Tour by winning the qualifying tournament.

Freiman and Blumenherst got married on Dec. 29, 2012.

That December was a dizzying time for Freiman for many reasons. Coming off a stellar season in Double-A (.298 average, 24 home runs), as well as a stint with the Israel team in a World Baseball Classic qualifying tournament, Freiman figured he would be added to San Diego’s 40-man roster.

The Padres didn’t add him, however, leaving him unprotected for the Rule 5 draft. The Houston Astros picked him. Late in spring training in 2013, the Astros waived Freiman, and Oakland signed him.

Freiman stayed in the majors all year, playing 80 games for Oakland. He batted .274 with a .716 OPS.

The right-handed Freiman often platooned with the lefty-hitting Moss, also a former Sea Dogs player.

In 2014, Freiman began the season in Triple-A, but he was with Oakland in the second half and made the postseason roster.

Had he made it to stay?

“No. If you’ve made it, you have some kind of long-term guarantee,” he said. “For a guy I like me, I was thinking about doing what I could that day, to give myself the best chance of having a uniform in my locker the next day.”

In spring training of 2015, Freiman hurt his back. “When I did return, I didn’t play well,” said Freiman, who stayed in Triple-A all year.

Meanwhile, Blumenherst was playing well on the golf course, amassing career earnings of $534,000. But she elected to stop playing full-time after the 2013 season, and the couple celebrated the birth of a son, Will, in 2014.

“I’m thrilled that she’s with Will and that she’s able to spend so much time with him,” Freiman said.

Freiman’s professional life took several more turns, starting in December 2015 when he was waived by the A’s and signed by the Braves.

The Braves traded Freiman to the Nationals on March 27. After sending Freiman to Triple-A Syracuse, the Nationals released him on April 21. Then came seven games with the Long Island Ducks, before the call from Boston.

“The Red Sox hold a special significance for me, as they would for any person who grew up in New England,” Freiman said.

His friend, Hassan, called to congratulate him.

“I told him I was coming (to Portland),” Freiman said. “He talked about how much he loved the city, that I had a lot to look forward to.”

So far, Portland is enjoying Freiman, who has reached base in all six games he’s played, batting .333 with six RBI, including a walk-off RBI single Friday. His double on Sunday just missed clearing the Maine Monster left-field wall.

His good start with the Sea Dogs is all part of his plan to get back to the majors.

“I need to hit better. It’s no secret I have not performed since 2014,” he said. “I’m capable of doing that. It’s just a matter of doing it … we’re working on it.”