Do not do that. You will be violating the rules of procedure. Have your lawyer defend the proceedings and do that for you. If you don't have a lawyer, get one. You cannot do this on your own.
An attorney-client relationship is not formed by my responses to questions on Avvo. My responses are not intended to be legal advice and must not be relied upon as legal advice.
I agree that it would not be following procedure, and that you should consult an attorney in order to properly let the judge know about that hardship (assuming it's even relevant), but if your question about whether it's safe is because you don't have valid immigration status, then I think it's probably unlikely that ICE would come after you for writing the letter. You may wish to send it to your children's father instead, and have him take it to court, but unless ICE was looking for you (due to criminal or immigration history) I don't think that the fact that you're without status and wrote a letter would make you an enforcement priority for them so that they would come looking for you.
Having said that, I repeat that I think you should consult an attorney directly instead of sending anything to the judge. The rules of procedure are in place for a reason. If the case is scheduled for a "master hearing", for instance, then it is really not the time for the judge to consider evidence like that, and you would be causing an unnecessary delay and inconvenience for the court. If the case is set for an "individual hearing", then any evidence should have already been submitted, and a copy given to the other side.
I'm attaching a link to the Legal Service Providers list for Massachusetts. I suggest you contact one of them instead.
Please note that he information above is general in nature and is not intended to create an attorney-client relationship between us. It is intended simply as background material, is current only as of its indicated date, and may not include important details and special rules that could be applicable to your case. You should consult an attorney directly before acting or refraining from action.