BOSTON — Mitch Moreland was the hero for the Boston Red Sox on Sunday night, hitting a walk-off single in the ninth inning to give Boston a 6-5 win over the Houston Astros. For Moreland, who has struggled mightily since the All-Star break, the clutch hit could be a sign that he’s starting to finally turn the corner.

“I hope so,” Moreland said. “I hope it gets it going.”

Moreland’s 2018 campaign has been a tale of two seasons – a hot first couple of months that earned him his first All-Star selection in July, and a prolonged slump that has made him an offensive liability throughout the second half. Entering Sunday, he was hitting just .179 with a .579 OPS since the All-Star break.

“We talk a lot about his swing. It’s one of those things where he knows what he has to work on,” said teammate J.D. Martinez. “It’s scary because some days it’ll show up and it’s like, ‘dude, watch out.’ And then other days, for some reason, he really struggles with it.”

Moreland’s poor second half has been a bit unlucky, with just a .207 batting average on balls in play, but lack of production is lack of production. It was bad enough that the Red Sox to begin working out Brandon Phillips at first base to see if he gives Boston another option there, alongside Moreland and Steve Pearce, who struggled throughout August.

Moreland, considered an excellent teammate and one of the most likely Red Sox to be a manager at some point, has continued working with coaches and teammates like Martinez as he tries to break out of his slump. A former 17th-round pick who was asked to convert to pitching after a rough first season in the minors, Moreland has spent a good chunk of his career trying to rebound.

“It’s always frustrating not getting results because that’s kind of what you see,” he said. “You’ve just got to keep working. That’s what I’ve tried to do. I’ve had plenty of ups and downs in my career so it’s not something I’ve never done. Just gotta continue to fight through it.”

The high standard Moreland holds himself to has been noticed by coaches and teammates who are anxiously waiting the return of an All-Star-caliber offensive player. Though Boston’s offense has been strong enough in the second half of the year to hide Moreland’s struggles, the team hopes to get him going in time for the postseason, when individual battles matter immensely.

“He’s so hard on himself that sometimes it works against him,” said Manager Alex Cora. “It’s been tough going. He knows it. We need to get this guy going offensively.

“We know what he did the first two months of the season,” Cora said. “So hopefully this is the beginning of something good for him.”

J.D. MARTINEZ joined Khris Davis as the only two hitters in baseball with 40 home runs on the season Sunday night, as he hit a three-run homer to left field in the fifth inning to give Boston a 5-1 lead. Martinez became the first Red Sox player to reach 40 home runs in a season since David Ortiz hit a franchise-record 54 in 2006.

So what did the accomplishment mean to Martinez?

“Nothing,” Martinez said. “I don’t care. Honestly, I don’t look at all that stuff. I worry about the little things, the day to day and the process more than the results, really.”

Told that he was the first Sox player to reach 40 homers in 12 years, Martinez admitted that the accomplishment was “great” and “humbling.” But his goals, which are process-based and results-based, do not include personal statistics.

“Imagine starting the season off and saying, ‘I’ve gotta hit 40 home runs.’ That looks like – you’ll never hit that,” he said. “But if I get caught up in trying to hit the ball on the barrel each at-bat, how am I gonna do that? Worry about the small goals and the big ones will take care of themselves. That’s why I never get caught up in it.”

Martinez measures his success based on how many balls he hits on the barrel of the bat on a nightly basis. Doing that makes it easy to bounce back from an 0-for-5 showing like he had Saturday.

“I feel like looking up at the scoreboard and at statistics is like death,” he said. “It’s bad. Like don’t look at it. It doesn’t do anything. What good does it do? Nothing. Like yesterday, I came out, went 0 for 5 and we lost the game. You come back today and you’ve got to bounce back.

“You get caught up in your numbers and this and that, you’ll go crazy. This game is too much. It’s based off failure.”

RICK PORCELLO took signs from his usual catcher for Sunday night’s start against Houston.

Sandy Leon was behind the plate for Boston despite his recent offensive struggles. Leon is mired in a 3-for-46 slide over his last 19 games, one that followed a modest four-game hitting streak through Aug. 8.

“We have to make sure he stays in the middle of the field,” Cora said. “If that happens, then we’re in good shape. There are other guys who are struggling, too, and we need them to get going.”