I have been searching at the Microsoft website and other places but it seems it not clearly defined anywhere.
After carefully looking at the Azure resource naming page, it is not defined as App service but as Microsoft.Web.Site. The naming length is maximum 60 characters (and minimum 2). This is for the subdomain part only (not including the azurewebsites.net part).