My (probably not very healthy) hack is to watch YouTube. My brain focuses on one thing and all the thoughts keeping me up just stay quiet.
If you have persistent sleep problems even after applying all the advice, if you can afford it, consider taking a sleep test/study to learn what’s the core issue
Interesting, what year was that? Before Ubuntu shipped with pipewire by default I do remember it having the worst Bluetooth experience, so maybe something similar was the case with WiFi?
Anecdote as well: the non-working Bluetooth lead me to perform my very first (successful) dive into system files to replace Alsa with Pipewire