First of all, wearing headphones while sleeping is not strongly recommended. But if you're resting in a noisy environment, or if you're used to sleeping with headphones on,Wired Sleep Earphone
, it's a must. Here are some suggestions for you:
Choose headphones that match the shape of your ears. If your ear canal is too small, it is recommended that you choose small ear canal headphones
Try to find soft earphones, and try to turn down the volume of the earphones when you sleep.
If the music listening application you are using has a function to turn off the timer, it is recommended that you set the time to turn off the timer. Otherwise, listening to music with headphones for long periods of time can damage your hearing.
like: