Usually erections happen due to increased blood flow to the penis at desire. In some persons this flow may be reduced due to some problems like lack of good desire and lack of continued arousal. while having sex you must keep the arousal continuous as a fantasy in your mind and maintain the erection.
Next Steps
Premature ejaculation is said to occur if one ejaculates within one minute of entry in the vagina. For this to be mastered you will have to learn to control ejaculation using a specific technique which can be explained only by a sexologist in person. so find a sexologist near you and learn the technique of delaying ejaculation
Next Steps
For good erections, one must have sex only when aroused and NOT because you are sleeing together with your partner. For desire to occur some days of abstinence if needed. Also having sex on empty stomach can cause good erections. Also many men have good erections on waking up from sleep. if you have adequate sleep of 6-8 hours, this erections are seen. So if you find yourself erect in mornings, try and have sex that time. It will last better and also may have longer sex time