Don't do it unless you don't mind losing the laptop (and the data on it).

Typically, people live in spaces where the air has some humidity. Air will hold some amount of water vapor depending on the temperature (more if warmer). A typical indoor space might be carrying, for instance, half the humidity that it can accommodate at room temperature. When you open the fridge, some of this humid air gets in. When you close it, the temperature crashes from room temperature to near freezing, and now the water vapor that it is bearing exceeds its capacity at this low temperature.

What happens to the excess water vapor? It condenses into liquid (water droplets) on any suitable surface - such as the insides of a laptop. This is already bad since it can lead to corrosion and rust on internal components (note that every time the fridge is opened, new humid air gets in for a new dose of condensation). Even worse is that when you take the laptop out and try to power it on, you can get a short circuit which will cause electrical damage.

It could also trip hidden moisture sensors and void your warranty, and I believe the temperature swings aren't great for the battery either.

In theory you could take some unnecessarily laborious precautions to reduce humidity before refrigerating: For instance, you could seal the laptop in a plastic bag together with desiccant to dry out the air in the bag, and then refrigerate. However, if you then take this cold laptop out of the fridge, its cold metal surface will collect condensation from the air in the room. Cutting air circulation like this will also hamper the effectiveness of refrigeration.

The fundamental problem here is that "cooling" the laptop constitutes bringing to the temperature of the room you are in. Once you go below you get a risk of condensation: A 24 °C laptop might be fine in a 25 °C room with 50% humidity, but it could have problems in a 30 °C room with 100% humidity (although you wouldn't like such a room either). The fridge will crash the temperature to something like 4 °C, which is too low.

A safer alternative is to increase circulation: Have a big room/ceiling fan (make sure it doesn't have some kind of humidifier) blow air at or around the laptop. This will remove air that is heated by the cooling laptop and replace it with fresh, cooler air, which will remove heat better. Moving air is also cooler for somewhat complicated reasons. This is really the best you can do (assuming there isn't some dirt blocking the laptop's air vents or something obvious like that). Any complicated "active cooling" would involve so much extra work to take care of "side effects" like above, that you would end up being better off just buying a new laptop that doesn't overheat as much.