Hampton saw themselves go 1-0 down after a quarter of an hour, Marvin Morgan scoring on his return to the Beveree Stadium.
However, the Beavers managed to score just before the break, Malachi Napa’s deflected shot found the back of the net.
Sweeney’s night can to an abrupt end though, being substituted in the 70th minute, receiving a heavy knock.
Despite his withdrawal, the team pushed on and ten minutes later got their reward, Max Kretzschmar smashing the ball into the top of the net.
They made it three in stoppage time, Harrison Crawford broke through after Bath claimed handball, but it wasn’t given and he slotted home.
The win put Hampton up to 11th in the Vanarama National League South table, unbeaten in ten, winning all three of their previous fixtures.