I do get regular small markings like this on the head of my penis, including where a small vessel bursts and causes a bleb underneath the top levels of skin. I have dealing with these issues for around 7 years.
The best advice is you need to develop a sense of how to be kindly towards the head of your penis to minimise the possibility of this occurring. You don't say whether this marking occurs every time you masturbate to ejaculation? You mention this can occur during sleep. While this may be difficult, try experimenting with different ways of laying in bed so that additional pressure is not placed on the head of your penis.
With masturbatory practices, try stimulating yourself so that you recognise the precise point where no damage occurs. Then, while flaccid, you need to start to massage the penis on a regular basis - if you can avoid an erection that would probably be better. Again, you need to find just the amount of pressure and amount of time you are massaging your penis so that you always avoid damage within the head. Find a nice oil or lube to do this, perhaps an actual massage oil, or even Baby Oil would be sufficient.
Unfortunately, you will experience a lot of the downside of what you have been already experiencing. Without developing your individual 'Penis Friendly' approach the blood vessel (s) causing this may never become naturally resilient enough to withstand the rigours of having an erection and sexual activity. When you do get the internal injury the only thing to do is to abstain from masturbation and try to avoid erections for as long as it takes. I frequently have to avoid all forms of flaccid and erect stimulation for 3, 4 and 5 weeks at a time - you may need to do this for far longer until natural healing has occurred.
Then, start flaccid massage very gently - the idea is that resilience develops over an extended period of years - and YES, I do mean years - in the hope that eventually the damaged blood vessel can achieve natural strength and resilience. My penis issues began when I was 16 / 17 YOA - I am 61 now, and have to work at maintaining my penile health everyday: having a sense of when to rest, when I need to stretch, when I need to use a steroid prescribed for one of the issues I have, and when to lay off all activities.
You could see it as a 'training program' - only you will constantly start from zero each time injury occurs. Until you develop the personal knowledge of what to do, how far you can take things, when to back-off completely, and when to take the correct number of weeks and even months of rest, then, slowly build the massage and progression to extremely gently massage when you are erect, then again, after an extended period of 5 to 7 months of no injury issues, add very slightly more pressure. Unless and until you can do this with no injury issues, and the blood vessel develops a greater level of resilience - you will always have the problem!
However, as Tang3 states, go to a Urologist - they may come up with a solution that may be lead to a way of resolving this .....
Do none of the above and you are almost certain to experience what you have now throughout your life, unless the blood vessel (s) self-heal themselves naturally through time ..... Good Luck ....