A Spanish military hospital ship Wednesday picked up the bodies of 24 migrants in the Atlantic Ocean off the coast of Mauritania .