At the time of granting dissolution of a marriage to which one party is mentally ill or at any time thereafter, on application of either party or of the guardian or conservator of the mentally ill spouse, or of any person, town or other municipality charged with the support of the mentally ill spouse, or the Commissioner of Administrative Services if the state is charged, the court may make such o