Yosef Karo, Shulchan Aruch — Yoreh Deah 335
“ One should not visit a sick person during the first 3 hours of the day because every person is light in his sickness in the morning and does not feel that he needs one to ask for mercy on his or her behalf [pray for them] , and one also should not visit during the last 3 hours of the day because then sickness is heavy upon him or her, and one would despair from asking mercy [find it difficult to do so] (and anyone who visits without having asked for mercy has not fulfilled the commandment) (Beit Yosef in the name of Ramban) . ”
