Travel is sometimes a curse, and often a blessing. Just occasionally, it’s like a trip through a children’s story. Earlier this year, we found ourselves in a fable. For a week, we lived next to a little girl who shared her cave with 300 sheep. Over the centuries, her ancestors had hollowed out a pinnacle of rock. It now had so many windows it looked like a multi-storey shortbread. Through the main door I could see a donkey, and then – higher up – stovepipes, light bulbs and a Turkish flag. Here was a warren for human beings.

Our own cave was more elegant but with much the same view. It looked out over a huge swathe of Cappadocia; a swirling landscape the colour of oatmeal and peaches; gorges full of pinnacles like clusters of spears; the distant cone of Mount Erciyes, lightly powdered in snow.

This being a fable, the pinnacles were known as “fairy chimneys” and every morning the sky was full of hot-air balloons (it’s a long-established tradition for visitors to drift over Cappadocia in a balloon).

While the shepherdess enjoyed all this with her sheep, we watched in Ottoman splendour. Our cave had been transformed. Only Lucy (our five-year old) had a bed in the rock. The rest of our suite erupted grandly out of the ground. One room was like a parliament for sultans. There were alcoves, silks, a magnificent bed, seating for 20 viziers and an acre of Persian rugs. We even had a giant sultan’s bathtub, with a view across the steppes.

Ours wasn’t the only palace inserted in the cliff. A tiny underground street led away to another 30 rooms. They were all unforgettable. Some had sumptuous, subterranean drawing rooms and private wine cellars.

Others had collections of Roman jewellery or Ottoman costumes just waiting to be worn. Once, all this had been part of a village, deep in the rock. For years, it had lain abandoned after an outbreak of peace. Then, in 2001, it was revived by a remarkable man, Ömer Tosun, who named it The Museum Hotel. But all this burrowing needs some explaining. Like so much that is beautiful, it began with extraordinary violence. At first, the brutality was geological. About 70 million years ago, Mount Erciyes exploded, along with two other volcanoes. They smothered the land first in shortbread (properly known as tuff) and then a wafer-thin coating of basalt. Soon, the basalt began to crack, and the elements got in, and tore the tuff away.

Eventually all that was left were small blobs of basalt atop columns of tapering tuff. These are the so-called “fairy chimneys” and are up to 100ft tall. Actually, geologists have a much better word for them that’s both sinister and comic: hoodoos.

Unfortunately, the next wave of violence was predictably human. With so much ash and sediment, Cappadocia had become famously productive. At a time when the world’s population was 23 million, it had a city of 17,000 souls. Naturally, it was soon attracting unsavoury visitors. Among them were Hittites, Tabals, Persians, Romans (in AD17), Byzantines, Seljuks and Ottomans. The history of Cappadocia has been a skull-cracking tale.

In time, people learnt that the only way to survive was by ducking into holes. In this, the tuff was perfect. It could be cut like cake, and a good team of miners could scoop out a mansion in less than a week. The rock would then harden on exposure to air, and keep its shape for hundreds of years. “And that,” said Ömer Tosun, “is the great miracle of Cappadocia.”

Across the region there are now around 30 underground cities and over a thousand rock-hewn churches. Mustafa, one of Ömer’s guides, took us to Kaymakli, which was started in the second century as a retreat from the Romans. It was like a city designed by little boys. There were rat runs, escape chutes, bottomless shafts, secret larders and massive millstone doors that rolled into place. We spent what seemed like hours clambering around its streets. “And yet,” said Mustafa, “you’ve only seen 20 per cent of it. This city extends eight stories underground…”

Mustafa liked these cities, but preferred the churches.

It was almost as though he had a hotline to the ninth century and could make the frescoes leap into life. During our tours he found us high-rise churches (Soganli), churches hacked into cliffs (Ihlara Canyon) and a mountain honeycombed with chapels (Goreme).

But my favourite was Kolonlu. To get there, we had to walk an hour down Rose Valley, scramble into a gorge, jump two streams, slink along a ledge and then pass through a crack into the rock. Inside was a beautiful clean-cut nave filled with silvery light. I half-expected to see masons, packing up their tools, but they’d long since left, over a thousand years before.

Our last few days, we headed for Mount Erciyes, the source of all the tuff. It stood astride a city called Kayseri. Extending eight storeys up – instead of eight down – modern life clearly isn’t quite as cosy as the old, but there was an intriguing museum. Among its curios, we found some ceramic “torpedoes” (for burying Romans), a dried-up child, and a magnificent sarcophagus carved with the labours of Hercules. Ancient Cappadocia, it seems, was a tough place to live but a terribly elegant place in which to die.