Don't know what you mean by spontaneous. If you're having erection problems, it's important to know why. It could be and most likely at that age is psychological, but there are also many physiological problems that can cause it. A visit to a urologist would at least give you some idea if there's anything going on down there physically that might adversely affect you, but again, lots of things can do that and the most common problem is psychological. And of course, if it's psychological then yeah, you can fix that. Many physiological problems can also be fixed, such as nutritional deficiencies, fitness problems, and heart problems.