Kana spelling is common when the kanji is not needed or for softer nuance.
Etymology
The word is composed of 密 (secret, dense) and the adjectival suffix やか. The exact historical derivation is uncertain, but the kanji reflects the core meaning of secrecy and quietness.