I guess it's once again time for my standard PSA response to this genre: various chronic medical conditions can interfere with sleep. If you consistently have trouble sleeping or sleeping well over an extended period of time, it very well could be something more than "poor sleep habits".
Sometimes people are speaking from direct experience with well-validated medical conditions fucking up their lives for multiple decades until someone eventually bothered to actually order the relevant diagnostic test.