That happens to me all the time, I'll be talking to someone and they'll be like 'ouch, that must've hurt', referring, of course to the big ass bruise on my leg that I didn't realize was there.

But, yeah, scratching your hand on something in your sleep sounds pretty plausible.