There's nothing wrong with dogs sleeping in your bed. Jackson has been since he was 4 months old.
But he always proved to be reliable. First, I'd rule out medical problems. Second, I'd work on training
issues. If he's peeing in the bed, you need re-train. You could always put a crate or something on
your night-stand (this is what I did in the beginning, because I knew he'd be in my bed eventually).
If it's marking, neutering will probably help. I'm assuming he's not neutered yet?
Good luck