just because you arent a virgin doesnt mean your hymen broke the first time...some people are virgins and its broken from tampons or whatever. so it could be that, a cut, your period, etc.
It most likely just means you just got into it and were a little too rough. I wouldn't think to much of it if you dont feel any pain and the bleeding stopped shortly there after. It can happen during sex as well not just masturbation.
There are a number of possible causes, like irritation that caused you to bleed, a cut, infection, STD, the beginning of your period, or something else. If it bled just for a short period of time and then stopped after, then it was most likely just a cut or irritation that happened when you were masturbating. That should heal on it's own and just be aware of any signs of infection(itching, increased discharge, different odor, etc) in case that happens later. Take care.