He needs to put on special socks before getting out of bed and doing wudu; can he wipe over them?
Question

I had an operation to treat varicose veins for the second time. I have to wear a special sock that prevents blood from stopping in my leg’s veins, otherwise the disease will return, and it is not easy to have a third operation. I have to wear this sock before leaving bed or my veins will be full of blood and this will decrease the benefit of the sock. Is it permissible for me to wear this sock before I leave bed for fajr prayer (before I perform wudu’)? Bear in mind that this sock covers my leg from toes to thigh, and as my profession requires me to stand for long time (university professor) I have to wear the sock. Please clarify the matter for me, may Allah reward you!.
Praise be to Allah.Firstly:
We ask Allah to heal you and grant you well being in this world and in the Hereafter.
Secondly:
If you can put on these socks before you sleep, when in a state of complete purity, this is good. It is well known that the non-traveller may wipe over the khufoof (leather slippers) and the like for one day and one night (24 hours) from the first time he wipes over the socks after breaking his wudu.
If you do wudu and then put them on before you sleep, and you wipe over them at the time of Fajr, it is permissible for you to wipe over them until the time of the next Fajr.
This will solve the problem of putting on the socks when not in a state of purity.
Thirdly:
If you cannot do that, such as if it will be harmful to wear them whilst sleeping, then there is nothing wrong with putting them on before getting out of bed, and that will come under the ruling on plaster casts, because you have no choice but to wear them and you will be harmed by not doing so., and it is not essential to have put the plaster cast on when in a state of purity in order to wipe over it. This is the view of the Hanafis and Maalikis. See al-Mawsoo’ah al-Fiqhiyyah (15/108).
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said in Sharh al-Kaafi: Undoubtedly the correct view is that it is not essential that plaster casts be put on when in a state of purity, rather when there is a reason to do so, they may be put on and one may wipe over them. End quote.
But it must be noted that if we regard these socks as being like plaster casts, in that case one must wipe over the whole thing, top and bottom, down to the ankles, and it is not permissible to limit it to the upper surface only, as is the case with khufoof and socks.
And Allah knows best.