She had a headache from lack of sleep.

Literal

She [topic-は] sleep-insufficiency [because of-で] headache [subject-が] did.

睡眠不足 (すいみんぶそく) means 'lack of sleep' — 睡眠 (sleep) + 不足 (insufficiency). 頭痛がする means 'to have a headache' — がする is the pattern for experiencing sensations (頭痛, 吐き気, めまい). The で marks the cause: 'because of sleep deprivation.'