You probably have the (factory default) option to "fix broken links" turned on. Fix broken links removes files when it can't find them. This can happen if your NAS is temporarily offline or unavailable. The option is here:
tools > Options > Library & Folders > configure auto import > tasks > fix broken links > (I recommend setting it to NO)
With it set to NO, MC will never again remove files when they are missing, either temporarily or permanently.
Now, how do you get your metadata and links to your NAS media back? As Jim said, you should restore and MC backup. MC makes backups about every 3 days automatically. File > Library Restore Library > (choose backup here)
MC should default to putting you in the backups directory. If it doesn't it should be in <Your User Directory>/Documents/JRiver/Media Center 22/Library Backups . Just choose a backup made before you had this problem and MC should restore the right stuff.
As for your question "where is the MC metadata"? It's in MC's database, which is typically located on your internal disk. Full details here:
https://wiki.jriver.com/index.php/Library#Location_on_DiskGood luck.
Brian.