Boyfriend can't get an erection most of the time. He is able to generally while sleeping. And he is able to ejaculate even without erection?

Boyfriends. Then he needs to see a Urologist. I am not sure what you expect from strangers on the internet. He is not the one here asking questions. He needs a thorough medical, physical, and laboratory investigation of his problem. Don't you think?