A seasoned veteran at 34, Mattock has played in all three of the EFL tiers over the course of his career.
He has had spells on both the blue and red sides of Sheffield, and spent seven years as a key figure for Rotherham.
He was most recently on the books of Harrogate Town, although the Sulphurites allowed the defender to seek pastures new at the end of the 2023/24 season.
Harrogate had loaned Mattock to the National League in the latter stages of his time at the club, with Hartlepool United providing a temporary home.
He has now dropped into the National League North, on the sixth rung of the English football ladder, to add a wealth of experience to Marine’s squad.
After putting pen to paper, he said: “I’m looking forward to be playing with a newly-promoted team with high hopes to go further.
“Hopefully my experience will bring some good positive morale to the club. Sometimes young players like to feed off senior players who have done quite a lot in their career and hopefully I can do just that, as well as adding a bit of structure and knowledge to the back line.”
Marine are newcomers in the sixth tier, having secured promotion from the Northern Premier League Premier Division last term.
They have had a tough start to life in a new division, failing to win any of their opening four games.
Marine boss Neil Young said: “Joe is someone with good experience, which is another element of what we have been missing at times this season.”
Fleetwood Town take on Rotherham United on Tuesday night, and tickets are on sale today ahead of the 7:45pm kick-off.
The Second Round fixture at Highbury will take place on Tuesday 27 August for a 7:45pm kick-off, and with Onward Cards once again not valid for the fixture, all supporters will need to be tickets.