I am very glad to hear that he is passing urine normally, as this can cause odd posturing behaviors and is an emergency when they cannot go. If we can rule that out and provided he isn't passing stool on you nor going less often, then this does support feline joint pain.
Now you noted you have used cat arthritis medicine but not what you have used. If he is just on a feline friendly anti-inflammatory, then we may need to try another or consider adding in a stronger pain relief agent from his vet (ie Bupenorphine, Tramadol, etc) to manage this.
Otherwise, I do also want to note some OTC nutritional supplements that may also be of benefit. First, you could consider trying glucosamine/chondroitin supplementation. This is a nutrient supplement that is available at your vets,pet shops, and health food stores (as capsules, liquids, and even treats). It works by aiding joint suppleness by helping cartilage replenish itself and blocking enzyme destruction of cartilage in the joint. Often we can find this helpful in animals with arthritis. Normally we give kitties 50mgglucosamine + 15mg chondroitin a day per 10 pounds of body weight. So, do consider trying this with him.
As well, we can find fish oil (omega 3+ 6) beneficial for cats with arthritis. This is a natural anti-inflammatory and can reduce inflammation in sore joints. Typically, we will give 90 mg EPA and 60 mg DHA per 5lbs of body weight. So, this too would be something to consider for him (and could help him move stool if that is an issue for him).
Overall, this posturing in this situation sounds most suspicious of back/hip/spinal discomfort. Therefore, we'd need to adjust his pain treatment and support his joints to see if we can stop this behavior and get him more comfortable.
Please take care,