Sleep with earbuds
Generally speaking, it is better to sleep
without earbuds in place.
If you do, no harm will come, as i presume you are not listening to loud music while you are trying to sleep.
The bigger issue sounds like trouble sleeping. A noise generator in your bedroom, playing soothing sounds or music is a better choice than earbuds.