Dimming on and off 2x5m led strip with arduino

Gotcha!

On esp8266, analogWrite() goes up to 1023 by default. So 255 is only 25% of max brightness.

You should either change your code to fade up to 1023, or put

analogWriteRange(255);

in setup().

Either way, you may then find that your MOSFET gets hot.