Bergeron's goal was his fifth of the season, Pastrnak's his fourth and Marchand's his first after he compiled seven assists in the previous two games. Bergeron also had an assist, as their line has combined to score 22 points in the past three games, all Bruins wins.
Joakim Nordstrom also scored, and Matt Grzelcyk added two assists for Boston, which beat Edmonton for the second straight time after six consecutive losses in the series.
The two teams meet again in Edmonton next week.
Connor McDavid scored for the Oilers, who were playing their first game since a season-opening 5-2 loss to the New Jersey Devils in Sweden on Saturday.
Jaroslav Halak made 25 saves in his second Bruins start. Cam Talbot stopped 28 shots for the Oilers.
McDavid got Edmonton on the board first. The former MVP used his speed to burst through the neutral zone and past Boston defender Zdeno Chara, putting the puck through Halak's legs at the 3:43 mark of the first period.
The Bruins answered with three goals in a six-minute span. Pastrnak skated in with slick puck movement and put it past Talbot's stick side on the backhand while on the power play to knot the score at 1 at 9:20.
Marchand scored when the puck took a lucky bounce off Edmonton's Drake Caggiula on Boston's second power play at 14:37, and Nordstrom added his first goal as a Bruin on a give-and-go with David Krejci 36 seconds later for a 3-1 edge.
Neither team scored in a testy second period. Boston's Kevan Miller and Edmonton's Jujhar Khaira dropped the gloves and were assessed five-minute majors for fighting. Later, Bruins forward David Backes and Caggiula got tangled up for offsetting roughing penalties.
The Oilers couldn't close the gap in the third period. Ryan Nugent-Hopkins came close on a puck off the post that skittered along the entire goal line before getting swept away.
Bergeron capped the scoring with an empty-netter with 35 seconds remaining.