Yes it's OK to wear diapers to bed whether you need to wear the diapers or just want to wear the diapers.
If you wet the bed like my kids do who are 6 years old and 8 years old then wearing a diaper to bed is a good thing and saves you from waking up in a wet bed.
Diapers should be worn when needed or if you just want to wear the diapers.
A child should be at the age that they stop wetting the bed when they stop wearing diapers at night.
Some kid will stop wetting the bed by age 5 to 8 years old and then not need to wear diapers at night and some kids may wet the bed until age 15 to 17 years old and still need to wear diapers at night.
I wore diapers to bed as a kid and until I was 17 years old when I finally stopped wetting the bed.
My 6 year old son and my 8 year old son wears diapers to bed still because they wet the bed and they wear Pampers Cruisers size 7 diapers which hold really well to the wetting they do.
They even wear the diapers during the day when away from home like now we're camping and they are wearing the diapers because they have a weak bladder as well.
Diapers are made for all ages and there's no set age that diapers are for.
The average age for a child to stop wearing diapers is between ages 18 months to 3 years old.
However some kids don't potty train and stop wearing diapers until age 4 years to 5 years old which is normal.
Some kids may also need to wear diapers because of a weak bladder or for bed wetting even past 5 years old which is okay and normal.
A 4 year old should still wear diapers if they need them.
Some 4 year olds need diapers for bed wetting and some 4 year olds need diapers because they are not ready to use the toilet.
Although most children do potty train before 4 years old and some potty train as early as 18 months to 2 years of age it's normal for a 4 year old child to still not be potty trained.
There's no set age that a child must be potty trained as all kids are different.
My 4 year old son is not potty trained and he's not ready and my 8 year old son was not ready to potty train until he turned 7 years old.
I never even tried potty training and I just let him decide when he wanted to use the toilet.
By age 7 years old a little after his 7th birthday he decided to remove the diaper and use the toilet.
Eventually all kids will learn to use the toilet when they are ready.
But some kids will potty train by age 18 months to 3 years old.
There's a lot of 4 year olds wearing diapers both day and night and it's a normal thing.