A cemetery is, by its name, a dormitory. The Greek koimeterion meant a sleeping place, and the people buried in one were, in the language of the word, only asleep.
The Greek word comes from koiman, "to put to sleep," which is connected to keimai, "I lie down." Etymonline traces both to a Proto-Indo-European root, kei-, "to lie." Even before the Christians, Greek writers used sleep as a gentle way of speaking about death.
The decisive step came with the early Christians. Their writers were the first to use koimeterion for a burial ground. In Latin it became coemeterium. The Saturday Evening Post's word column suggests the choice was meant to blunt the impact of naming a burial site directly.
From Latin the word passed into French. It appeared as cimitiere in the 12th century, and English adopted it by the late 1300s. Early spellings varied, but the Saturday Evening Post says it was already pronounced roughly as it is today.
English had a native word before this. Old English speakers called a burial ground a licburg. Lic meant "corpse" and later became "lich," as in the lich-gate of a churchyard. Burg meant a walled settlement.
The meaning has shifted since. Etymonline notes that in the 19th century the word came to mean, typically, a large public burial ground not attached to a church. "Graveyard" is younger than cemetery. According to the Saturday Evening Post, it developed in the mid-18th century.
The root kei- may also sit, according to Etymonline, behind a surprising group of English words: city, civic, civil and civilization. Etymonline hedges these links with a "might," and does not spell out the connection. If they hold, the words for a town and for a graveyard grew from the same idea of lying down.