Welcome to Just Answer. Is your cat scratching himself? Do you notice any thing that looks like specks of dirt or pepper on him or in the bed?
Ok. That staining means that the material / specks are flea feces / poop. So there is a very good possiblity that the tiny black bugs could be fleas. IF they aren't, then there are fleas somewhere in the environment. I would take him to your vet to have him quickly checked over and to have them recommend some flea products that they carry. They have the good stuff that will work. Here is a good link on fleas.