Through the Maryland men’s basketball team’s first four games, guard Melo Trimble led, while three freshmen served as his running mates. Meanwhile, the bench struggled to make an impact.

For example, in the Terps’ 71-66 win over Towson on Sunday, Maryland’s backups managed two points on a field goal from guard Jaylen Brantley. In the Terps’ contest against Stony Brook on Tuesday night, Trimble again directed, but he received a boost from the reserves for the first time this season, despite coach Mark Turgeon’s pregame worries about his depth.

Maryland’s bench scored 33 points to help push the Terps past the Seawolves, 77-63, at Xfinity Center.

“That was as deep as we’ve been all year,” Turgeon said. “It was an encouraging night. We are a deep team, but we haven’t been.”

Maryland (5-0) jumped out to an early lead, but Stony Brook (0-3) kept pace. Trimble often allows his teammates set the tone, but he drove to the basket more while the Terps tried to cushion their lead — scoring 13 of his 21 points in the frame. Rookie guards Anthony Cowan and Kevin Huerter and forward Justin Jackson combined for six points in the half, while forward Damonte Dodd sat out with a concussion.

So when Trimble spread the ball midway through the half, the substitutes stepped up.

Making his first appearance after spraining his foot late in the preseason, forward Michal Cekovsky scored 11 points. Guard Dion Wiley, who’s struggled to make contributions after missing last year with a torn meniscus, made his first four 3-pointers of the season despite being a game-time decision (virus). Brantley also added six points.

The bench’s production was especially crucial to improving Maryland’s inconsistent shooting. After connecting on 28.7 percent of their 3-pointers entering Tuesday, the Terps shot 8-for-19 from beyond the arc.

At the break, Maryland’s bench and Trimble accounted for 30 of the Terps’ 38 points. Having quality off the bench allowed Turgeon to make substitutions whenever someone wasn’t playing well for the first time this season.

“I could tell that I have a lot more energy when I come back in the game,” Trimble said. “Now Dion is going to be playing the way he’s capable of playing, and [guard] Jared [Nickens] is going to get better as well. As the season goes by, Coach Turgeon always says we’re going to get better. He’s right, we are going to get better.”

The backups continued to contribute in the second half, especially Cekovsky and Wiley. Early in the frame, Cekovsky scored alley-oop dunks on consecutive possessions, receiving a technical foul on the first for hanging on the rim out of excitement, and finishing the second by pounding his chest with a smile.

Turgeon said Cekovsky had practiced around 10 times since late August, and Monday was his first participation in about two weeks. The junior’s emergence, Turgeon said, helped the Terps balance scoring on the perimeter and in the paint better than they have all season.

Turgeon also noticed Wiley was holding his left thumb on the ball too long while shooting — something the sixth-year coach attributed toward the redshirt sophomore’s 0-for-5 start from the 3-point line. So Friday morning, Turgeon practiced with Wiley. The Oxon Hill native fixed the issue he said emerged while he was injured.

Despite Maryland’s diverse contributions, the team’s problems defending in the paint and grabbing boards endured after the Tigers outrebounded the Terps, 46-33, on Sunday. Maryland was outrebounded again Tuesday, 38-35, an issue the squad hasn’t solved since last season. Meanwhile, forwards L.G. Gill, Ivan Bender and Cekovsky all picked up four fouls midway through the second half.

Regardless, the bench’s sharp shooting and bolster in the paint helped Maryland maintain its undefeated record before traveling to face stiffer competition in the Barclays Center Classic this weekend. Turgeon hopes the Terps will fix the issues as they get healthier.

“We have a great bench,” Cekovsky said. “We always get excited, cheering for each other. The team chemistry is really good. I love everybody.”