Debt restructuring is one of the policy tools available for resolving sovereign debt crises and, while unorthodox, it is not uncommon. We propose a scenario analysis for debt sustainability and integrate it with scenario optimization for risk management in restructuring sovereign debt. The scenario dynamics of debt-to-GDP ratio are used to define a tail risk measure, termed conditional Debt-at-Risk. A multi-period stochastic programming model minimizes the expected cost of debt financing subject to risk limits. It provides an operational model to handle significant aspects of debt restructuring: it collects all debt issues in a common framework, and can include contingent claims, multiple currencies and step-up or linked contractual feature...