FOR centuries, old seadogs the world over perished on the high seas, taken not by war, nor the weather, but by a mystery illness. The first clues to their malaise were swollen and bleeding gums and a weariness that not even the cat o' nine tails could cure. Their weight would fall away as quickly as their strength, their joints would ache and eventually the haemorrhaging in their mouths would spread throughout their bodies. It was a long, slow, painful death which left the captains of many a vessel perplexed.

It struck on the long voyages but not the short. So the crews of coastal colliers would show no ill-effects on the two-week trip from North Yorkshire to London. But when the voyages to sea extended into months, so the sailors dropped like flies.

It was given a name - scurvy - but there seemed no cure. Seamen were plentiful enough in the many ports around Great Britain, but good sailors were not. So it was pure self-interest, not necessarily philanthropy, which drove North-East navigator Captain James Cook to find a cure.

"There was an awful lot of scurvy, it killed more sailors than sea battles," says Dr David Thomas, exhibition organiser at the Capt Cook Memorial Museum in Whitby, which is staging a display on the ailment.

Ships' stores were dire affairs. Fresh water was sealed in barrels but more often than not would go off. Meat was preserved in dry salt or brine, there was no fresh fruit or vegetables "and the biscuits were so infested with weevils they would walk about the place".

Life on board ship was dangerous. If the sailors didn't fall overboard drunk, they risked being felled by a falling spar or whipped by a loose rope. Conditions were cramped, ventilation was poor, below decks was dank and dark and infested with rats. It was the ideal environment for disease, particularly tuberculosis. Foreign ports offered a variety of virulent poxes, from yellow fever to dysentery. But it was the lack of vitamin C which was proving fatal, a fact the contemporary scientists were only beginning to realise.

Cook may not have realised the medical reasons behind the success of his regime, but he knew it worked and he only ever lost one sailor to the dreaded scurvy.

From 1768 to 1779, he embarked on three major voyages - the first to chart the coast of Australia, the second to look for a mysterious continent in the southern oceans and his last fateful trip in search of the North West Passage, through the Bering Straits, to join Europe with the Pacific, so ships could avoid sailing around the dreaded Cape Horn. Each voyage would last about three years, with long periods out of port.

"Cook was interested in keeping a healthy crew," says Dr Thomas. "He took good sailors to sea and you couldn't necessarily get good sailors, so he was keen to look after them."

The way forward was to keep his vessels ship-shape, clean, well-aired, and clear of rats and weevils. But more important still was the food he himself ate, setting the best example possible, in most cases, to the crew. Every port was scoured for fresh fruit, vegetables, fish and meat. Onions, new potatoes and sauerkraut all contained the crucial element in the fight against scurvy - vitamin C. Citrus fruits were the elixir of life to those struck down by the ailment.

During one of his voyages, botanist Joseph Banks developed the purple mouth ulcers, the dreaded tell-tale precursor of the sailor's scourge. Six tablespoons of lemon juice a day saw the ailment off in less than a week. Cook also carried distilling apparatus and experimented with producing drinking water from the sea and producing concentrated citrus juice from fruit.

Cook himself couldn't have been a less picky eater if he had tried. He would sample the delights of any exotic offering and on one occasion this was almost his undoing, not to mention that of his crew. Anchored off the coast of New Zealand, they dined on a species known locally as "ugly fish". The delicacy was probably New Zealand toadfish, an inedible variety, and every one went down with food poisoning.

Exercise and relaxation were also part of Cook's regime. Musket drill sat alongside dancing and singing in the practices to be encouraged and Sundays were kept relatively work-free. In 1776, he was awarded the Copley Medal of the Royal Society for his contribution to preserving the health of his men at sea - at a time when another captain lost 1,000 men to scurvy on a voyage to the Pacific.

The Whitby exhibition chronicles Cook's obsession with diet. The display fills the attic room of a house he inhabited as an apprentice for nine years. The exposed ship's timber beams, brick chimney breasts and wooden floors have changed little since Cook's days, giving the museum a wonderfully authentic feel. Showcases feature medical works of the day and all manner of horrific surgical instruments, including scalpels, a dental wrench, catheters, a primitive syringe, an amputation saw, a leech jar, a bleeding bowl and an apothecary set, everything the ship's doctor needed to keep the men alive.

And Banks and Cook were more successful than most at doing just that, ensuring the navy sailed thanks to the good food in its stomach. Ironic then that Cook should come to such a sticky end, finding himself in the cooking pot of natives in Hawaii.

l Scurvy Navy: Health at Sea, runs at the Whitby Captain Cook Memorial Museum until October. Admission is adults £2.80; children £1.80; senior citizens £2.30; school groups £1.50; family ticket £7.80.