How to keep an erection longer. Almost all the time, an erection is all in your head. And if it's in your head, these tips will definitely help you. First of all, do you get. If you have some kind of erectile dysfunction and don't want to bother with methods and training, then taking pills is the fastest way to get an erection but it can be. Most men have an occasional episode of being unable to get and keep an erection, which is often a result of stress, tiredness or anxiety.