Welcome to e health forum.
An erection occurs, when under the influence of sexually arousing stimuli the penis becomes engorged with blood. The normal erection response is regulated by vasodilators (nitric oxide), and levels are positively influenced by testosterone. Hence lack of testosterone can be the cause of lack of erections.
Lack of morning erections could also be due to psychological factors, stress or due to over masturbation resulting in penile injury.
Hence it would help you, if you might consult with a urologist for a physical examination and proper advice.