The Mosfet is acting as a source follower, wityh the gate voltage biasing it into the linear region, and the 1uF capacitor acting as a storage element for the gate voltage. The 1M resistor allows the charge to be slowly increased or decreased, so the mosfet is going to turn on more or less, depending on the voltage on the capacitor. The charge will gradually leak away, so it will eventually dim and go out, and the mosfet will be running in a linear region, where you have to be aware of current flow and power dissipation, and most mosfet devices are not specified for DC use, as they have to be massively derated to run there. You might find big variance with temperature and between devices as well, and in general probably do not want to draw more than 2A or so of current, even with a 50A device, as it will need a pretty big heat sink to dissipate the power it is generating as heat.
Works sort of well if you only have a few small LED's to dim, and can handle the power loss, but it will drift brightness with time, and will eventually go off, but will still draw a small current as it dims.