The answer is the RC time constant of the FET D-S capacitance and your load resistance - either the 10M res or the probe resistance or both. To turn OFF the mosfet has to charge up its D-S capacitance - if there is no low-ish impedance path for this to happen it will take a while to charge fully to rail. The output capacitance of a mosfet is also quite non-linear with voltage, which explains the shape of the waveform, with the C value increasing as the volts get closer to zero - slowing down the waveform more and more.... Regards, Orson Cart.