If he isn't sleeping well he will need the toilet at night.
Toilet training is a matter of building solid conditioning to go on a specific surface, to wait until given access, to ask to be given access...
To achieve that you have to build motivation/desire to ask you and have you involved in the process.
In practice that means you taking him out and rewarding him for pee/poo in the appropriate place (on a surface significantly different from anything found indoors), within a second or two of that pee/poo happening - so not after he has trotted back to you at the door (that would be reinforcing him for coming back to you/the door, not for toileting where you wanted).
It's highly likely he is conditioned to toilet on soft absorbent stuff - pee pads, carpets, rugs, clothing left on floors etc, all feel much the same to him.
Relieving himself IS reinforcing in its own right, so without you adding extra reinforcement for going on the right surface AND managing him so he has no opportunity to make a mistake, he isn't going to learn what you want him to learn.
Keep him in the same room as you at all times - yes, that means at night too, t his is likely to mean he sleeps far better and is less likely to need the toilet at night.
Stop providing pads indoors, they're confusing. Similarly having the door open so there is no need to ask you, there is then no involvement, no reward from you... blurs the lines between in and out.
Take him out super frequently initially to work out when he is likely to need to go.
Reward with food and praise every single time he toilets in the right place.
Don't let up on this fairly intensive supervision and management for two or three weeks - you have a strong habit of toileting on indoors surfaces to break.
To transition out of your room at night - when you would trust him to have free access back from where he sleeps to your room, gradually start to move his bed further away from your room - if he comes back to sleep on your floor rather than his own comfy bed, you know you've taken this step too fast/moved too far, just take it back a step or two and try again in a few days/weeks.
The end goal should be that he will come and ask you to take him out, sleeps well at night so does not need to go out at night, and doesn't toilet indoors.
I would get him checked for a UTI, but i suspect the issue is he is not sleeping well and just hasn't actually been toilet trained.