Hi!
Irritation after masturbation is not uncommon. I don't have an exact answer to how long the pain should last. If it is still painful in the coming days it may be worth talking to a doctor about. Does it speficially hurt in your clitirous or do you have other pains (painful urination, vaginal pain, etc)? Is the pain like a burning sensation? Was this from one masturbation session or a build up of a couple of days? Did you use anything that had not be cleaned beforehand?
In case the way you might be choosing to masturbate may be causing irritation, this is a good piece on just the basics of it
Going Solo: The Basics of Masturbation
Depending on how you masturbate, you could be causing irritation with friction. The best way to reduce friction is by using some for of a lubricant which you can find more about here:
Lube 101: A Slick Little primer Let me know what you think!
Hope this helps. I look forward to your response.
- Val