
I've done this countless times. It results in headaches, dents and bruises.
I found a little tip that helped: Either put a stocking (wave) cap over the scarf after tying it or put a head band on to hold the scarf in place. It's simple and it works.
The cotton pillow case also made me a little weary so that caused me to tie my scarf tighter for fear of it coming off when I tussled and turned at night .
I'm looking into making the switch to satin or silk pillow cases.