Probably not what you want to hear, but I sorta agree with Marmish, there is obviously something that he likes about under the bed: being near you, being in a confined space, being somewhere dark, being somewhere cool...if you can replicate that elsewhere somehow he might become attracted to it.
The only thing I can think of that might resolve all those possibilities is a crate. I know a lot of people don't like to crate their dogs but if there is a safety issue with him under the bed and it crashing down on him it will definitely be a safe option for him. Most dogs do like small confined, dark areas to bed down because it makes them feel safer.
I've seen in different instances where you can cover the crate with something (wood or anything else fairly rigid) and use it like a night stand as well, the dog is beside you still and has its confined little area and you tuck him in every night
My dogs got so used to it, we'd say it was "bedtime" and they'd run and get in themselves
Good luck finding something that works