Nightmare is caused by the nightmare man, a kind of evil spirit, struggling with one. It is prevented by placing a sharp knife under the pillow, and stuffing the keyhole with cotton.
Windham, Me.

Nightmare is caused by the nightmare man, a kind of evil spirit, struggling with one. It is prevented by placing a sharp knife under the pillow, and stuffing the keyhole with cotton.
Source: Current Superstitions (1896), entry 827.
Fanny D. Bergen, editor.
Modern normalized navigation; the historical attribution above remains unchanged.