It would usually be a son who would be given their father’s first name as a middle name.
Did they have sons?
Were your Mum and her cousin the first born in each family?
What middle names were Martin and Lawrence’s other children given? Are there any themes?
Are any family who might know the answer still living?
Are these the only two examples you have found in your family?
I don’t pretend to know the answer and unless you can find someone who knows for sure, it can only ever be speculation. I am just trying to see if there might be a reason for this in your examples, hence the questions. If there are only two it doesn’t see to be a tradition I wouldn’t say.

Even if you find other families have done the same, they may have different reasons for doing so, and I don’t know that there was any kind of tradition regarding this.
Both Martin and Lawrence are fairly common surnames so if you find other females being given similar middle names, it could have been the mother or grandmother’s maiden name. Further research would be needed to confirm.
Surnames as middle names is pretty common for both males and females. If females were named to honour their fathers you might expect to see feminine versions of the father’s name, but maybe their mothers didn’t like this idea.

(and the feminine version of Lawrence is?

)
Just my take on it .....