The Australian held off the Slovakian champion and BMC’s Greg Van Avermaet in the sprint to the finish to claim his fourth win of the season.
Sprinters Mark Cavendish and Alexander Kristoff were dropped from the main bunch some distance from the finish on the tough stage, almost ensuring the finale would come down to Sagan and Matthews.
The breakaway was caught with more than 50km to go but Alexej Lutsenko (Astana) went off the front in the final 20km, opening a gap of 22 seconds as he passed the 10km to go mark.
Stage three breakaway member Marco Marcato (Wanty-Groupe Gobert) caught and passed Lutsenko with 6.7km to go and Sergio Henao soon bridged the gap to the leader on the final climb.
Henao and Marcato were joined by Jan Bakelants, with the trio staying seven seconds off the front with four kilometers left, although a kilometre later the group was back together, leading to a bunch sprint.
Geraint Thomas (Sky) was held up by a late crash, but retained his fourth place overall, nine seconds behind leader Tom Dumoulin (Giant-Alpecin). The time bonus for finishing second moves Sagan to just one second behind leader Dumoulin.
Tour de Suisse 2015 stage four: Flims-Schwarzenbach (193.2k)
1. Michael Matthews (Aus) Orica-GreenEdge, 4-36-00
2. Peter Sagan (Svk) Tinkoff-Saxo, st
3. Greg Van Avermaet (Bel) BMC, st
4. John Degenkolb (Ger) Giant-Alpecin, st
5. Jasper Stuyven (Bel) Trek Factory Racing, st
6. Dani Moreno (Esp) Katusha, st
7. Silvan Dillier (Swi) BMC, st
8. Thibaut Pinot (Fra) FDJ, st
9. Matteo Trentin (Ita) Etixx-Quick-Step, st
10. Robert Gesink (Ned) LottoNL-Jumbo, st
Overall classification after stage four
1. Tom Dumoulin (Ned) Giant-Alpecin, in 11-19-08
2. Peter Sagan (Svk) Tinkoff-Saxo
3. Daniel Moreno (Esp) Katusha, at 8 seconds
4. Geraint Thomas (GBr) Team Sky, at 9 seconds
5. Thibaut Pinot (Fra) FDJ, at 15 seconds
6. Jakob Fuglsang (Den) Astana, at 17 seconds
7. Steve Morabito (Sui) FDJ, at 18 seconds
8. Kristijan Durasek (Cro) Lampre-Merida, at 21 seconds
9. Bob Jungels (Lux) Trek, at 22 seconds
10. Simon Spilak (Slo) Katusha, at 22 seconds
Geraint Thomas shows Cycling Weekly his racing scars