Hi there young man...
Masturbation at night has no specific relationship to the dryness unless you don't wash post masturbating or if you are using some soap 🧼 that is causing an allergic reaction and subsequent dryness.
Coconut oil appears to have helped you.
However, if the dryness is linked to some allergy or infection (eg Hsv) then that will have to be addressed.
Fungal infections don't usually present this way.
Have you been sexually active aside from the masturbation?
A more detailed history and a personal consultation may be in order.
Next Steps
Online or any in person Consultation with a Dermatologist.
If Banglore based most welcome across.
Health Tips
Use gentle cleanser like Dove 🕊️ or Cetaphil to clean the area post masturbation etc and not harsh 🧼
Check your lube/condom etc (if using something like this) as one may be allergic to something and may present with this dryness.