Praise be to Allah.
The diapers that are well known are more like underpants, which is a garment that covers the most private part. The majority of scholars are of the view that it is to be included with the clothing that is not allowed, because it shows the shape of the body.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said, when discussing the clothing that is not allowed in ihram: And likewise the underpants are more emphatically disallowed than trousers."(Majmu‘ al-Fatawa 21/206).
Based on that, if someone needs to wear underpants or diapers whilst in ihram, there is nothing wrong with that, but he must pay the fidyah for one who has an ailment, for which he has the choice: sacrificing a sheep, or feeding six poor persons, giving each poor person half a sa‘, or fasting for three days.
That is because of the hadith of Ka‘b ibn ‘Ujrah (may Allah be pleased with him), when he needed to shave his head whilst he was in ihram. The Prophet (blessings and peace of Allah be upon him) said: “Shave your head, and fast three days, or feed six poor people, or sacrifice a sheep.” Narrated by al-Bukhari (1917).
Shaykh Muhammad ibn Salih al-‘Uthaymin (may Allah have mercy on him) was asked about the pilgrim in ihram wearing underpants because if he doesn’t wear them, he will suffer some harm.
He replied: If he fears that he may suffer some harm, there is nothing wrong with wearing it, but if he can feed six poor persons, giving each poor person half a sa‘, that will be better."(Liqa’at al-Bab al-Maftuh 177/ question no. 16).
Based on that, whoever needs to wear diapers whilst in ihram because of sickness and the like, it is permissible for him to wear them, but he must offer the fidyah of one who has an ailment.
And Allah knows best.