It's always the nights you can't sleep that the ticking of the clock gets on your nerves.

Literal

Night sleep-[potential-れ]-not-[when-時に限って], clock [gen-の] kachikachi say sound [subj-が] bothers-one thing [copula-だ].

~に限って ('specifically when, precisely at the time of') is a set phrase expressing frustrating/ironic timing — 'it's always the case that (precisely when X) Y happens.' カチカチ is the onomatopoeia for ticking. 気になる ('become bothered by, be concerning') is the state-of-concern pattern. ~ものだ again for general truth.