There is no physical or electrical, magnetic, or other reason you cannot place one electrical device (in this case a microwave oven) ontop of another electrical device (in this case a fridge/freezer) other than as Kwatt inferred which is the falling danger
Every electrical device is type tested to the highest electrical, magnetic and frequency emission standards and as long as each appliance haven’t been damaged, altered or are of an age where these standards are likely to have been compromised then go ahead.
For your own peace of mind obtain an ohm and a volt meter or a multi meter and test between the appliance frames first that there is no voltage difference when plugged in and operating and then that the ohms between are less than 5 ohms.
In summary it is no different than placing each individual device in contact with a stainless steel bench