The Kokoon Nightbuds are a pair of (technically) wireless earbuds specifically designed to wear in bed. They are rated by their OEM to track and enhance sleep through a combination of hardware such as an in-built heart-rate sensor and an app that delivers "personalized sleep coaching". They are now available as a mainstream product rather than on crowdfunding as before.
https://www.notebookcheck.net/Kokoon-announces-a-general-launch-for-the-sleep-focused-Nightbuds.583955.0.html