How to find your files
First check if the merge is really over. Try
git merge --abort
Are your files already here? Good! If not, follow the next instruction.
# this shows a graph of commits,
# you will be able to see the commit in master before merge
# save it's sha1 (number)
git log --oneline --graph --decorate --all
git checkout <sha1-of-commit-in-master-before-merge>
# also you can check the last commit in another merged branch just before the branch (with the same command).
git checkout <sha1-of-commit-in-dev-branch>
Check if your files are present in both branches (they should be).
If that is so, you can do the following to return your master branch to the state before merge:
git checkout master
git reset --hard <sha1-of-commit-in-master-before-merge>
Why did it delete your files
There might have been a merge conflict. No idea what it actually was.
How to merge
Here's a good instruction.
How to resolve merge conflicts in Git?