Cobb (7-8) allowed a run and four hits. He struck out five and walked two in his fourth consecutive quality start and third consecutive win. His ERA is 1.93 over his last four outings.
Fernando Rodney record his major league-leading 37th save in 38 tries by pitching a scoreless ninth that extended his club record to 22 consecutive saves.
The Rays have won 10 of their last 12.
Seattle's Blake Beavan (7-7) pitched six innings, allowing eight hits and four earned runs. Beavan allowed all four runs on five hits in the third inning.
Upton's two-run shot to the upper deck in left field put Tampa ahead 3-0. His 13th homer was followed by a single from Matt Joyce and a double by Ben Zobrist to make it 4-0.
Sam Fuld singled and stole second before Desmond Jennings' single drove him in for Tampa Bay's first run.
Beavan allowed five consecutive hits during his 43-pitch third inning. He struck out Carlos Pena looking to end it. After three innings, Beavan had recorded nine outs and allowed seven hits.
Meanwhile, Cobb was cruising. Mixing a curveball with a low-90s fastball, he retired the first eight Mariners before Brendan Ryan lined a single up the middle in the third. Cobb quickly disposed of Dustin Ackley with a grounder to second to close the inning.
Eric Thames' single through the right side in the fifth scored Trayvon Robinson, who had led off with a triple, to make it 4-1. But Thames was picked off first base by catcher Jose Molina after a pitch in the dirt bounced straight up to him and Thames had taken a few steps toward second.
Chone Figgins walked, then Ryan and Ackley grounded out to end the inning.
Hard-throwing Mariners rookie reliever Carter Capps made his home debut in the seventh inning. Capps walked three and struck out one.
Zobrist had three hits and Rays manager Joe Maddon said he will continue to play shortstop, where he started Monday.
NOTES: Seattle C John Jaso has reached base safely in a career-high 10 consecutive games. ... Seattle OF Franklin Gutierrez changed his medication in hopes that it reduces his headaches. Gutierrez exercised Monday and is scheduled to perform baseball activities Tuesday. He has been on the 15-day DL since June 29 because of a concussion. . Tampa Bay 3B Evan Longoria received a day off Monday. Maddon said nothing is wrong with Longoria, and he is expected to be back in the lineup Tuesday. . Joyce extended his career-high hitting streak to 12 games with his third-inning single.