N.Y. Military Law § 312
2. In any proceeding commenced in any court during the period of military service to enforce such obligation arising out of nonpayment of any sum thereunder due or out of any other breach of the terms thereof occurring prior to or during the period of such service the court may, after hearing, in its discretion, on its own motion, and shall, except as hereinafter provided in this act, on application to it by such person in military service or some person on his behalf, unless in the opinion of the court the ability of the defendant to comply with the terms of the obligation is not materially affected by reason of his military service