All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
The Muslim jurists are of the view that it is desirable to cover one's head when relieving oneself, and considered this as one of the etiquettes of entering the toilet. Al-Bayhaqi reported that 'Aa'ishah said: "The Prophet used to cover his head when he enters the toilet." An-Nawawi commented on this narration saying that it is weak. However, Al-Bayhaqi said: 'It is reported that Abu Bakr used to cover his head when he entered the toilet. This is an authentic narration.'
After mentioning the quotation of Al-Bayhaqi An-Nawawi said: 'The scholars agreed that it is permissible to act upon weak narrations in matters relating to etiquettes, and the above narration is one of them.' Nonetheless, here in Islamweb, we do not know of any scholar who says that it is compulsory to cover the head when entering the toilet. As regards covering when eating, we do not know any one who stated that it is desirable to do so.
Allaah knows best.