It's possible that you may have irritated your urethra during masturbation, leading to the burning sensation when urinating. Since there is no discharge or urinary frequency and the pain is improving gradually, it could be a mild irritation rather than an infection. Make sure to stay hydrated and observe if symptoms persist or worsen.
If the discomfort continues or you develop any other symptoms such as discharge, itching, or pain in other areas, consider consulting with a healthcare provider for further evaluation and guidance. They can provide appropriate diagnosis and treatment recommendations based on your specific situation.
Remember to practice safe sexual habits by using protection during intercourse to prevent STDs which can cause similar symptoms like burning sensation while peeing.