I ejaculate frequently while in bed and it's been happening for a year now. What can I do?
These are called wet dreams or nocturnal emissions. They are normal for males, though not every male has them.
Wet dreams come because your body has accumulated too much semen in the seminal vesicles. It needs to get rid of the old to make room for fresh semen. God built each man with the mechanism to ejaculate in their sleep while dreaming. It is sort of like sleepwalking but you masturbate while dreaming.
You won't have wet dreams when you are able sex regularly with your wife for the simple reason that semen won't be accumulating. But if there are times when you are way from your wife or illness prevents having sex, then the wet dreams will start back up again.
When a wet dream happens, wash any clothes or sheets that your semen gets on. If it is something not easily washed, then wipe it down with a wet washcloth. Just as women have to put up with monthly bleeding, men have to deal with semen being ejaculated.