The 34-year-old had previously kept the club in the National League as caretaker boss at the end of the 2023/24 season, but was beaten to the full-time role by Matty Taylor.
The former Portsmouth player departed the Stones for Solihull Moors in January, with Neil Gibson taking over.
The Welshman guided the club to safety on the final day but decided against returning next season.
Cox jumped at the chance a year on from being overlooked, and now he wants to make up for lost time.
Cox told the club’s website: “I’m honoured and thrilled to be back at Wealdstone in this role. When I took charge as interim, the reaction from the players, staff and supporters was incredible – and together we achieved something special.
“I know the potential we have here and I’m determined to build on that. Our ambition is clear: create a culture of hard work, unity and continuous improvement and I’m fully committed to giving everything to see Wealdstone thrive.”
Chairman Rory Fitzgerald said: “Sam is not only highly respected at the Stones, he is also one of the finest young coaches we have in our game.
“Throughout the 23/24 run-in he demonstrated an ability to motivate players, demand high standards and cultivate a positive environment in the dressing room. We are excited to work with him again and confident he will build a squad capable of competing in the National League.”