I have used these (they actual style has changed over this period of time) for some 10 plus years.
https://earinc.com/product/iplugz-gen-ii/Drawbacks are, the price and they are wired. I only wear them on the bike so, never tired to sleep with them. Never had them come out putting on or taking off the helmet. But the wires might get in your way sleeping but you did say wired was an option.
Another option, that I use when I need ear protection but when to hear music or iHeart is,
https://www.3m.com/3M/en_US/company-us/all-3m-products/~/3M-WorkTunes-Connect-Wireless-Hearing-Protector-with-Bluetooth-Technology/?N=5002385+3290824073&rt=rudThey are comfortable and not very costly for what they do. But don't know if I could sleep with them on.
Not suggesting that these are "great" for your needs but they are products I would recommend for listening to music, ect. without affecting those around you.