Hi!
If there is no rash or skin discoloration (except for redness which is normal after scratching) and the symptoms come only when you are going to sleep, then you either suffer from pubic lice or from restless leg syndrome. Other than this, yes, it can be a fungal infection if you feel the itch during the day as well. Please discuss these possibilities with a doctor. Take care!
The medical advice given should not be considered a substitute for medical care provided by a doctor who can examine you. The advice may not be completely correct for you as the doctor cannot examine you and does not know your complete medical history. Hence this reply to your post should only be considered as a guiding line and you must consult your doctor at the earliest for your medical problem.