The Braves improved to 11-3 since manager Brian Snitker put Swanson in the No. 2 slot ahead of Freeman on May 10.
"I think we help each other a lot," Swanson said. "I would like to think that I help him, especially if I'm on base, that he would be able to get pitched differently. But having him hit behind me is fun."
Swanson drove Miles Mikolas' first pitch of the sixth inning over the wall in left, giving Atlanta a 2-1 lead. Freeman then hit his 13th homer, giving Atlanta its third set of back-to-back homers this season.
"Completely different than last year," Freeman said about Swanson, the No. 1 overall pick in the 2015 amateur draft. "He's staying on pitches a lot longer, seeing balls a lot longer, and putting the barrel on the ball. He's been huge for us."
Swanson and Freeman also hit consecutive homers in the second inning Wednesday night in San Francisco.
Foltynewicz (1-3) allowed an unearned run in six innings in his first win since Sept. 28. The right-hander struck out seven and walked none.
"I think that's the biggest thing right now is confidence, just throwing the ball with conviction," Foltynewicz said. "We kept them off balance just enough the whole night."
Swanson helped put it away with a two-run drive off Giovanny Gallegos in the eighth for his 10th homer. It was his second career multihomer game.
"It's really fun to watch," Snitker said. "He's a confident kid. He's been in the league another year. I sound like a broken record, but it's the truth. He's playing with a lot of confidence and knows he belongs here."
Mikolas (4-5) matched his career high with nine strikeouts in seven innings. He was charged with three runs and seven hits while exceeding his number of losses from all of last season.
"I had a couple games early in the season last year where I gave up four or five runs and we scored eight or nine and a couple tough ones like this," Mikolas said. "That is baseball. Things tend to even out, and I think that's why myself and a lot of the guys around the clubhouse aren't too worried."
Kolten Wong reached second on rookie Austin Riley's error. Harrison Bader then tripled to center off Acuna's glove, but he was tagged out after being caught in a rundown between third and home when Foltynewicz cut off the throw to the plate.
"That was a huge confidence point right there, just to get him out," Foltynewicz said. "I could have had a guy on third, no outs, and it could have been a big battle. But we got that guy out there and now we just, with no one on, now we go."
The Cardinals announced struggling right-hander Michael Wacha is going to work out of the bullpen. Wacha is 2-2 with a 6.39 ERA in his last five starts.
Wacha last pitched in relief on Sept. 26, 2016, versus Cincinnati.
Braves: OF Matt Joyce was placed on the bereavement list following the death of his uncle. Snitker says Joyce will miss all three games against St. Louis and return for Tuesday's home game against Washington. RHP Kyle Wright was recalled from Triple-A Gwinnett.
Cardinals: RHP Ryan Helsley was optioned to Triple-A Memphis. OF Lane Thomas remains with the club after being recalled to serve as the team's 26th man for Game 2 of Wednesday's split-doubleheader versus Kansas City.
Braves RHP Mike Soroka (5-1, 1.01 ERA) faces Cardinals RHP Dakota Hudson (3-3, 4.30 ERA) on Saturday night. Soroka allowed three hits in seven scoreless innings in his only previous outing versus St. Louis on May 15.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Venezuela baseball league delays season's start
Venezuela's winter baseball league has postponed play for nearly three weeks after MLB banned its players from playing in the league.
Think Max Scherzer is a lock to start the wild-card game if the Nats make it? Maybe not
Mad Max in a winner-take-all game seems like a no-brainer. But Washington might have an even better option.
The best move every contender made this season
Teams in the postseason picture made some big decisions to help get them there, but what was their smartest move?
Astros aim for playoff clincher vs. Rangers
The Houston Astros are one win away from clinching a postseason berth and officially staking their bid for a second World Series championship in three seasons.
Lester ready to step up as Cubs face Reds
Jon Lester relied on his teammates for a lift during his most recent start for the Chicago Cubs.
Phils face Braves, hope to keep playoff hopes alive
One of two trends could end Wednesday when the Atlanta Braves host the Philadelphia Phillies in the second game of their three-game series. Both starting pitchers are looking for their first win of the season against the opposition.