He joined the Bees from Maidstone United last season and went on to make four first-team appearances.
Sweeney is a central midfield player and a former England C international, getting his only cap against Slovakia in 2016.
Prior to joining Barnet on deadline day in January 2017, he made his name known at Kingstonian, where he played 102 games, scoring 10 goals in the process.
After short spells at Dulwich Hamlet and Maidstone United, he moved to The Hive after training with the squad for a few days.
After being named on the bench the day after his transfer, he made his Football League debut as a substitute against Plymouth Argyle. However, he failed to cement a place within the squad.
Three more appearances off the bench, he wasnâ€™t featured in the back end of last season.
The 23-year-old returns to the National League South and could make his debut for Hampton in the Emirates FA Cup Fourth Qualifying Round against Truro City tomorrow.