Hello,
If the antenna is on the roof and it is properly connected to the router, you should have no issues keeping the device in the cupboard.
After all, wood does not block or reflect radio frequency radiation, only a small amount of attenuation can be expected, and only if the device is stored with antennas the device has shipped with. Sudden temperature rise within the cupboard, capable of influencing device's operation is also unlikely.
Best regards,