Today, IP-Optical networks apply IP restoration as the default strategy to recover IP traffic from optical failures. This strategy has been preferred over optical restoration as it circumvents the lengthy delays involved in the reconfiguration of the optical layer. Although fast, IP restoration requires the overprovisioning of costly capacity to cope with optical failures. The advent of software-defined optical networking enables a changeover towards more efficient methods that integrate IP-Optical restoration. These methods should not only restore traffic from failures considered in the planning phase, but they should also efficiently restore traffic from unforeseen failures. This paper studies this problem by investigating optimization algorithms for capacity planning and multilayer restoration based on the theory of adjustable robust optimization (ARO). The approach performs offline optimization of the capacities of IP links as well as the routing and capacities of IP tunnels in both failure-free mode of operation and in a foreseen set of optical failures. Besides, the approach optimizes an affine policy that is applied online to recover IP traffic from unforeseen failures, thereby providing robustness to optical failures not regarded in the planning phase. To overcome the limitations of the affine policy, an alternative robust algorithm is formulated based on deep reinforcement learning (DRL) and graph neural networks (GNNs). By training a DRL-GNN agent, the performance of the restoration process is improved by further minimizing the traffic losses when unforeseen optical failures occur. Results in selected scenarios show that the algorithms outperform IP restoration in terms of capacity requirements, while minimizing the traffic losses in the case of failures. Moreover, the DRL-GNN method significantly improves the ARO-based affine algorithm, which shows the capability of learning the complex relationship between the capacity impairments caused by optical failures and the routing strategy required to restore IP traffic.