don't make him hard anymore?

He can't seem to stay hard when we have sex. Not all the time anyway. Sometimes he's really into it and some times he has to keep stopping to wank himself to get hard again. Is he not attracted to me anymore? How can I fix this?