I have to say that I agree with both answers. Both mimicking the format of Martinez' message, and plain old habit (since it is the default message format) can be explanations in and of themselves.
But there is one more option: readability by a third party.
The simplest version of this is that Watney expects NASA superiors to read their message chain (nothing is private), and Watney therefore signs his name to his message to make the conversation easier to read.
(This is technically speaking a variation of the "habit" answer, since my answer inherently means that everything would be readable by third parties and therefore requires name signing for clarity's sake)
But I think there's slightly more to it.
There's also a different version of this claim, one that is somewhat supported by the movie/book. It has been a prominent plot point that NASA needs to take care of what they do and how they approach things, as anything they do is in the public spotlight.
They avoid looking at the Mars base because it might show Watney's body (and they cannot prevent such an image from leaking to the outside world and hurting their reputation), they avoid conversation topics when those topics should not be a matter of public record, ...
I am stealing the image from the top answer, as this snippet supports my claim:

Take note of the following passage:
NASA's been limiting direct contact. I guess they're afraid I'll say something like "You abandoned me on Mars you fuckwits!".
If the conversation was private, NASA would not have to worry about that. Watney infers from the limited contact that NASA is worried about the public perception of their communication.
We can't know for sure that that's why NASA was intentionally limiting contact. Maybe Watney assumed that was the reason for their radio silence, while in reality there was another reason (e.g. they took their time to provide a comprehensive message) and the messages would always have been completely private (therefore it doesn't matter what Watney says as no one is listening in).
However, this does prove that in Watney's mind, he thought the conversation would be scrutinized by a third party.
Which is all the justification I need to claim that Watney signed his name for readability purposes to a third party observing the conversation.
Most likely, the third party (assumed by Watney to exist) would be the public; as Watney wouldn't expect NASA to be worried about what Watney says in conversations that are only readable by NASA personnel.