IRC states the following…
INSTALLATION OF MICROWAVE OVENS
M1503.1 Installation of microwave oven over a cooking appliance.
The installation of a listed and labeled cooking appliance or microwave oven over a listed and labeled cooking appliance shall conform to the terms of the upper appliance’s listing and label and the manufacturer’s installation instructions. The microwave oven shall conform to UL 923…EXHAUST SYSTEMS
RANGES AND OVENS
Freestanding or built-in ranges shall have a vertical clearance above the cooking top of not less than 30 inches (762 mm) to unprotected combustible material. Reduced clearances are permitted in accordance with the listing and labeling of the range hoods or appliances.
M1901.2 Cooking appliances.
Household cooking appliances shall be listed and labeled and shall be installed in accordance with the manufacturer’s installation instructions. The installation shall not interfere with combustion air or accessibility for operation and servicing.