WASHINGTON — Two deadly collisions between high-tech destroyers and easy-to-spot, slow-moving cargo ships in a little over two months have stunned many in the Navy and sent top leaders scrambling for answers.

But shipboard veterans had long seen signs of trouble. Factor in a shrinking Navy performing the same duties that a larger fleet did a decade ago, constant deployments that leave little time to train and relentless duties that require sailors driving 9,000-ton vessels to endure sleepless stretches that would be illegal for bus drivers, and avoidable accidents can happen, current and former officers said.

“What seems impossible — that two ships could hit in the middle of the ocean — becomes very real,” said Robert McFall, a former Navy lieutenant commander who served as the operations officer of the destroyer Fitzgerald in 2014. “If you are not at your best, events can start that lead to a disaster.”

Since the loss of 17 sailors after the Fitzgerald collided with a freighter near Tokyo in June, and a second destroyer, the John S. McCain, collided with a tanker last Monday while approaching Singapore, Navy investigators have been piecing together the causes of the fatal crashes. (On Sunday, the Navy said it had recovered the last of the bodies of the 10 sailors who died on the McCain.) Congress has scheduled hearings next month that will include top commanders and safety auditors.