Svefnpurka is a feminine word made from two words. Svefn (sleep) and purka (a miserable or a sleepy person).
The oldest written example from the Orðabók Háskólans (“the University Dictionary”) of the word svefnpurka is from a Latin-Icelandic dictionary, written and published in 1738 by Jón Árnason. There the given translation of the Latin word dormitor (from the Latin verb dormiō meaning “I sleep”) is “svefnpurka” and “sísofandi”. It is possible that Jón had in fact coined this compound himself as a myriad of Icelandic words in that dictionary are of his own concoction. (Wikipedia)