Your 4 year old nephew probably wears diapers at night because of bed wetting. It's very normal for 4 year old's to still wet the bed at night and need diapers.
Your nephew might need diapers for bed wetting until he is 15 years old or older. Very normal for a kid to wet the bed and wear diapers.
There's no age limit for diapers. If you need to wear diapers for protection from bed wetting or incontinence in the day then you can wear diapers at any age.