Most media is suppliers pack their media in polycarbonate bottles which block UV fairly well. If this is the case for your media bottles, you probably need only worry about leaving the material at room temp. for the duration that you did.
On the other hand, if in doubt, medium is the cheaper part of your experiment; use a new bottle.
If you are worried, remove your bottles with MS medium out of the hood before you turn on the UV light. Well-covered bottles temporally out of the hood should be ok (without getting contaminated).
If you are prepare media in glass bottles or jam bottles you screw the cap tightly ... However UV radiation will not pass through the glass. No problem. Even you autoclaved the bottles .. You are taking into laminar from outside only ... So we have to gave radiation for at least 5 min.
Time matters. Its depends upon time for how much extent we put the subject under UV.
Recently, once I forget to turn off the UV, UV remains ON overnight. Visually I found that the disposables like spoons, loops and tissue paper wipes etc which were under direct influence of UV, turned from white to yellowish brown (like burned) colour.
So, my conclusion is that if media is covered with lid means no direct influence of UV than there will be no effect while if there is direct influence of UV (which usually not in practice because usually UV is on roof and all the plates and bottle are covered from top) than there might be effect on chemistry especially hydration of media.
So recommendation is that don`t put belongings under UV for long duration, for short duration feel free to use.