You obtain a Nightmare Mane material at the end of a UGWW run (Shadow Lair: Rabid Snarbolax).
It's in the Sanctuary, which is the level after the Unknown Passage - it doesn't drop straight from the boss.
You get one every time you finish a Shadow Lair run, you don't buy them.
So you're going to need to do two runs - either that, or purchase one Nightmare Mane beforehand.
Apparently the material is a little out of the way and it's possible to miss it if you're not careful. :P