A UV-resistant cover can help when the display isnβt being viewed, but the biggest issue is that the bricks are still getting exposed whenever the cover is off. A clear UV-filtering window film is probably the better long-term solution because it protects the LEGO while still allowing natural light into the room.
Several window tint and film providers offer products designed to block a high percentage of UV rays without noticeably darkening the window. Looking at options from OC Tint Solutions may give you a better idea of the types of UV-blocking films available for residential windows. That approach helps protect not only LEGO bricks from yellowing and fading, but also other items exposed to sunlight indoors.
If space is limited and the windowsill is your only display area, combining a UV-filtering film with a lightweight dust cover for extended periods away from home would provide much better protection than a mat alone.