According to the gossip stone in Romani Ranch in the Cucco Shack, the All-Night Mask was used as a torture device.

"A torture device of insomnia called the All-Night Mask seems to be available at the Curiosity Shop..."
Contributed by ThisGuyInTheSuit