Yes it can. How quickly erectile dysfunction occurs depends on the reason. As men get older, their hormone levels and overall health might change and it can lead to a gradual change in erectile function. There are also things that can occur that create immediate and sudden changes, such as injury or illness. Another reason why erectile dysfunction might occur suddenly is for mental or emotional reasons. When the problem is caused by stress or other mental health problems, it can ease as quickly as it arose.