In a situation like this, it needs to be seen whether the problem is psychological or physiological. In today's day and age, with obesity and prediabetes running wild, we are seeing ED at an earlier and earlier age. It would help to know what his overall health is (obese, high blood pressure, triglyercide levels, etc..). There is actualy an old test called the "stamp test." In a normal male, there are cycles of erections through the night when he is sleeping. A stamp stuck on the penis at night (
http://www.umm.edu/ency/article/003339.htm
) can help to determine is the problem is more psychological.