That is odd. It must be what feels most comfortable to him. I can't see him wanting to rest on that hip if it actually hurt for him to do it. Maybe it's the most comfortable position because the hip's weight is resting directly on the ground instead of if it was on the upside, it would be hard to keep it from hanging down and pulling on the joint.
I tried typing a better explanation of gas problems for rabbits, last night, but lost it twice. So at one in the morning, you got an abridged version. The deal with gas is that, it could be caused by the orange and other sweet foods. as too many sugars and carbs in a rabbits diet can cause an imbalance in the gut flora. It then causes a slowdown in the gut, which causes a build up of bad bacteria and gas. Whch leads to a blockage, pain, not pooping, not eating, and can be fatal. It's called GI stasis, and I've actually lost one of my rabbits to a very severe case of it. But with this kind of imbalance, the gas isn't just a come and go thing. Once the imbalance happens it continues to progres unless the diet is changed, and the sugars/carbs causing the imbalance are eliminated or severely reduced.
The other causes of gas in rabbits can certainly be some meds, and certain foods. With azerane's rabbit, if I'm remembering right, it was a cruciferous veggie that started causing all the problems. Once that veggie was stopped, the gas problem started to go away. With your rabbit having gas problems right now, it's probably best to not feed sugary things until you sort out the problem, but some rabbits just have very sensitive digestive systems and can't tolerate any sugars and carbs or it starts causing digestive upset. I have a couple rabbits like that. They can't have anything sugary(even carrots) or they start to have digestive upset and pain. One of them can't even have pellets he's so sensitive. So it's just figuring out the cause of the problem. With my rabbit, right after I fed pellets, he would start sitting and acting like he was uncomfortable, so I knew it was the pellets. For your rabbit, it may be a little harder to sort out with him also getting meds for his hip. If you think it's one of the meds, maybe you could talk to the vet to switch him to a different one, and see if that fixes the gas problem. If you thinki it's one of the veggies, you can try eliminating one and see if it makes a difference. if not, then try another. I just suggested the cucumber being the culprit, as they are known to be a gas producing veg. But with rabbits it's very important to figure out what is causing the gas, and stop it as soon as possible. Rabbits aren't like us, where when we have gas, we just put up with it until it's gone, and we are fine. Rabbits usually will stop eating and drinking from gas pain, which can then compound the problem because that then slows down the GI system. Then if it continues, it can progress to GI stasis and a blockage. So that's why it's so important to figure out the cause and eliminate it from the diet. Because of your rabbits current situation, it is a little more difficult. I know that you are having a hard time keeping weight on him, so he needs food, but you just need to avoid ones that cause upset, as those aren't going to help anything. Non dairy probiotics do help if there is a gut imbalance from too many carbs and sugars, but if the gas is being caused by a veggie that is being fed, probiotics aren't going to help with that or fix it. Simethicone will help with gas some, by reducing the size of the gas bubbles and making them less painful and easier to pass, but simethicone doesn't stop the gas from occurring. Only eliminating the food source causing the gas, will do that. Try the cucumber. If the gas continues, then try something else. You can always increase the veggie amounts of the other veggies, to make up for the one you are eliminating.
It is going to be hard to put weight on him if you aren't feeding things with higher protein(alfalfa), fat, or carbs. Do you feel like your rabbit is sensitive to carbs in his diet. Does he start to get small poops, or start to sit like he's uncomfortable when you have fed things with carbs? I don't know if this has been mentioned, but black oil sunflower seeds are high in fat and lower in carbs than regular sunflower seeds, and may help your rabbit put on some weight. You will want to introduce them into the diet slowly(as with any new food), but the added fat may help him start gaining weight. Alfalfa can help as well, but if he is having a bladder sludge issue, then that may not be a consideration. With the bladder sludge, is he having actual toothpaste like urine, or grit in the urine, or is it just white and chalky. Cause that is normal for rabbits. They pass extra calcium in their urine. It becomes a problem for certain rabbits that are prone to bladder sludge issues cause they don't just pass the extra calcium like most rabbits. The picture in the first and second link, shows the difference between sludge and regular urine. I also included the bladder stone link, because it explains the issue with calcium.
http://www.medirabbit.com/EN/Uro_gen_diseases/generalities/Sludge.htm
http://www.medirabbit.com/EN/Uro_gen_diseases/Mech_diseases/Urolithiasis.htm
http://ontariorabbits.org/health/urinary
If your rabbit is just having white chalky urine and not actual bladder sludge, you may want to consider including alfalfa hay in the diet. A good leafy alfalfa hay, with small stems, can really help a rabbit put on weight because of the higher protein content. Just make sure to introduce it slowly and start with small amounts, as it can cause digestive upset if introduced too quickly. But if your rabbit does have bladder sludge problems, then a lot of alfafla isn't an option. If you could find foods that are higher in protein, that will help with the weight gain. Not sure exactly what though, besides alfalfa, and pellets with added soymeal. I know that softer grasses have a higher protein content, as opposed to when they are allowed to grow longer and get more stemmy.
Your rabbit is in a difficult situation, which is going to make it hard to figure out how best to help him stay healthy. All you can do is your best to try and figure it out. I know it's not easy though.