Royal Navy sailors have been working hard to help communities struck by a major natural disaster.