It's quite possible that you are either starting your period... or you otherwise scratched yourself while masturbating. Did you use an object that wasn't created for sex/masturbation? Or do you have long nails, or one's that may have possibly caused a small cut? If the bleeding does not stop and it is not from your period, then I would go to a doctor. Or otherwise, if you find that it happens often after masturbation with no chance of accidentally cutting yourself, you may also want to seek a doctor.
Oh... it's also possible that you broke or stretched the hymen, in which case the bleeding should be very minimal and should stop soon :).