Yeah, if you can! When you sleep on fabric, the fabric loves to soak up all the oils and sweat on our body, including our hair! Especially cotton. So you can add a lil extra to protect it overnight. You're also likely not sleeping dead still, so all the added friction can be damaging. The extra oil helps lubricate that motion to be less damaging and provides a bit of a moisture buffer before it all goes away again.
I personally have a silk beanie. Like this one! Not an affiliate link, not one I personally use, but it's the same idea. It can help with the price, especially considering you'll likely actually need 2-4 silk pillowcases, and then your sheets will also make contact with your hair, and your comforter, and... Yeah. Easier to put silk around your head than around your entire bed. You could also totally use a silk headwrap, like this one. I actually have used this one, and it worked amazing!! I just didn't like the extra long ties and didn't feel comfortable using it to protect my hair on the go, whereas the beanie looked less bed-time and more lazy day.