Fred, one of my rescued ferals did that soon after being trapped. I accidentally and FOOLISHLY left an empty can in the cat room after I'd fed them. Soon after, I heard a clanking noise coming from their room, and found Fred with a can stuck on his head. He was petrified, and so was I. I had a friend on the phone, calming me down and helping me sort out what to do. We eventually sussed that the lack of oxygen would make him calmer, and maybe pass out.
He did eventually calm. So I sat on him and held him down with a blanket and pulled the can from his head (it was mostly on his muzzle). One relieved Fred. I jumped out of his way sharpish.
No wonder I always looked like I self-harmed!