The German word 'Nelke' has also another meaning beside carnation: clove
The scent of the clove is used in Germany to shy away the midges.
So the line 'mit Naeglein besteckt' also could mean that the mother has ensured her baby's sleep by putting some clove to the upper part of his bed to help him sleeping.
Wolfgang