Heh, I am (obviously, heh) not a fish expert. I cannot really give much direct advice. You may want to talk with a vet (maybe one who delves in exotics? I am not sure), aquarium suppliers, etc.

I guess the only thing I can offer in relation to advice is that it sounds like it has something to do with something internal and not his water conditions.

OH! Also, I had fish that would sleep or just be on their sides. If I gave a light tap on the tank, they got up with no struggle, so maybe it's just a "thing" or habit or trait, even?

I hope all turns out well! I am always super upset when my fish pass. My betta died a few weeks ago and it'll probably be a while before I find another to *heart*.