Q. How come Yosef was placed in a coffin and then sunken into the bottom of the Nile, is that not a bitul of the mitzva of kebura, since you cannot bury in water?
A. Poskim mostly agree that one does not comply with the mitzva of kebura when the burial is done inside water. (See Mishpetei Uziel Y.D. 2., Kochav M’Yaakov p. 255, Hashabit Y,D. 6: 109 ). They mention as a proof, the fact that by Yosef it is only mentioned that he was placed in a coffin, but not buried.
Medresh (Beshalach) teaches that after the Mitzriyim drowned on the sea, the angel of the sea excreted their bodies into the land and told the earth’s angel; take what is yours so they can be buried on the land. They also quote the Yerushalmi (Maasros 5) who mentions that one recites “hamotzi lechem min hamaim” on wheat grown on water only.
Although Midrashim, Targum Yonasan Ben Uziel et. al., maintain that Yosef’s casket was sunken in the Nilus, Rashbam writes that he was actually buried in the ground.
Horav Shlomo Miller’s Shlit’a opinion is that since they were outside of Eretz Yisroel, the Avos didn’t necessarily keep all the mitzvos before Kabolas Hatorah. Besides, he added, Yosef’s burial was only temporary, since under oath the Bnai Yisroel were instructed to carry him out with them and bury him in Eretz Yisroel. Thus this was only a temporary burial stage, which in need may be permitted.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a