The sleepy huts are a huge hazard, as Jim (above) mentioned. The fibres can loosen over time and create either a strangulation or choking hazard for the birds. It also encourages hormonal behaviour, and if prolonged it certainly is not healthy for the bird mentally or physically.
I have a ring neck myself, and he sleeps like most birds do - either with his beak tucked into his wings if he's napping during the day, or at night he crawls into a corner and clings to it. I've tried to provide him with specific sleeping perches and areas for him, but it's just simply what he likes. And it's safest for him, too.
As for the issue with his health and lack of vitamin D... it would have to be a very extreme case if he's already extremely lethargic and is unable to stand upright at this point. A Certified AVIAN veterinarian is your best option. Your average vet generally will not know enough about birds to be of much help aside from a general prescription for vitamin meds or antibiotics. But if given wrong, they can do more harm than good. If he's having difficulty standing, I recommend putting him into a smaller cage with perches that are only a few inches from the ground and using towels on the bottom of the cage to soften his landing if he falls. I'm very sorry to hear that he's ill