@Jaime Olivares There is no out of box feature that can help you but you can implement the logic using APIM policy. You can use Set status code and set HTTP header policy to transform your backend respond according to your requirement.
You can set some flag to only execute your maintenance policy only during your backend maintenance. You can save the flag status and maintenance duration/time using APIM named values so it is easy to update these value. In your policy you can get the maintenance time and compare with the current time using APIM policy expression @(DateTime.Now.ToString())
and set the Retry-After header value.