The most common and most likely answer to this crossword clue is the 6 letter word MEGRIM
M
E
G
R
I
M
More clues leading to the result MEGRIM
Buddy explains!

The straight part
We know that "Nasty headache" is the straight/definition part of the clue. The straight part is often a synonym or definition, in this case nasty headache = megrim.The cryptic/wordplay part
In cryptic crossword there's often an wordplay/cryptic part as well.This part involves a more complex hint, such as an anagram, homophone, hidden word, etc.
Sadly, We don't have an explanation for this specific crossword clue yet.
What does MEGRIM mean?
MEGRIM noun- A headache; a migraine.
- A fancy, a whim, a caprice.
- (in the plural) See megrims.
- A type of European deep water flatfish, Lepidorhombus whiffiagonis; the whiff or sail-fluke.