There are different ways of masturbating - if you were merely rubbing yourself, were you bleeding from where you were rubbing? You could have irritated the sensitive tissue there - it would be unusual to have it bleed for very long. If some of the blood pooled into the vagina and didn't all come out right away, it would turn brown as it broke down and then could come out as a brown discharge. Likewise - if you masturbated by inserting something into your vagina, you could have irritated your cervix - the lower part of the uterus. This could cause this tissue to bleed, and again, some of this blood would pool in the vagina, and over the days some of that would turn brown before draining out. I would recommend some warm, and if you are having no pain, cramping, or pain or difficulty with urination, this will probably just pass. Now - this may be unrelated and just a weird period - so it may happen again.
Brown blood means old blood. You may have injured yourself while masturbating. The reason for the bleeding.
Is their an adult you can talk to about this? Maybe your mom, an aunt or a friend? I'm asking because if this discharge keeps up you may want to see a Dr. to find out what's going on.