There are several possibilities that come to mind, and happily all of them have solutions; the most likely thing that comes to mind is that this is simply the most comfortable position for him- if he has a weak back, poor body image or simply finds it uncomfortable in another position this would certainly imply a physical comfort issue. You may be interested in trying to put a pillow under your bottom while you're on your back; this can provide a more comfortable angle for sex, and is great when the man has back pain. Another possibility is that he simply prefers you on top for psychological reasons- some people are submissive in bed or have experienced trauma, or any one of a hundred reasons that make a more dominant position uncomfortable.
Generally, a physically capable man who loses an erection during sex is dealing with something that is sapping away his pleasure in the act- stress, fatigue or anxiety in most cases. It's not uncommon for guys to have performance issues with a person they care deeply about; it's difficult for us to talk about, but it does happen, and usually has little to do with desire; our brains get in the way. This is something that gentle reassurances will go a long way to fix- when it doesn't happen in another position, switching to you on top for a few minutes should make it possible to try again. Above all, improving your comfort with each other in and out of the bedroom will help.
Hi there--
Let's see if I can be of help. Just to clarify, is he still wearing a condom when this problem occurs or are you using another form of birth control now? Depending on your answer, there's two different possible directions we could go. First, if he is wearing a condom when you are trying to have sex, this may be cutting down on the sensitivity that he may need to help him keep erect in those certain positions. Or, conversely, if he is not using condoms and you are using another form of birth control, he may have difficulty trusting that other method. If there is any apprehension about you getting pregnant, that is one possibility that just might be part of this issue.
But you do say that he is generally not able to maintain an erection unless you are on top. Are you facing away from him or towards him when you are on top? The reason I ask is--at least in my experience--whether doing it doggie-style, spooning, or sitting on top of me while facing away from me, these positions provides me a greater amount of stimulation than in other positions. This could be a possible solution in your case.
While changing positions does temporarily remove direct stimulation to him, usually the mental stimulation that goes along with having sex is sufficient to maintain an erection.
What is interesting is that you indicated that he can maintain an erection for quite some time when you are not actually planning to have sex. This particular fact leads me to believe that it may not necessarily be a physical issue; rather a psychological one.
But, if you could clarify the condom question and add any other info you feel might be important, I'll go from there and try to help you as best I can. :)