Thanks for your question. There are many causes for morning erectile dysfunction out of which masturbating for long years is one of the main reasons. Other factors may be due to any strong medication or mental stress and physical over exertion. I would advise you to go to early sleep after having enough water. If this does not work, you can take tadalafil which is an oral medication. One tablet a day for two days may give you the desired result. You can also try another medication called sildenafil and try out which one works better for you. Another important thing is not lose confidence as a man as this episode may not be long lasting and very soon you will be able to regain morning erection.