Margetts, 25, has previously been on loan at Gainsborough Trinity and scored against the Gladiators on New Year's Day.
Boss Dave Frecklington said: "I'm not one for bringing in young lads on loan from pro-clubs when we have lads in our academy but this is different.
"We've had to send Marcus Marshall for a scan on his knee so the injury's more serious than we first though which is a real blow for the lad and the club.
"We haven't scored a goal in five games either so when we became aware that Jonny was available it was a no brainer. He's a proven goalscorer who'll help us immensely while Marcus is out injured."
Margetts started out with Hull City and has played in the National League with Lincoln, Stockport and Harrogate since.
He made six Football League appearances for Scunthorpe and Cambridge.
Matlock host Basford United in the EVO-STIK League Premier Division on Saturday.
Keep up-to-date with our exclusive email newsletters.
Subscribe