I can only speak for myself, but when I’ve had sleep problems it’s usually been from working too much and having anxiety due to problems with the project, or I can’t seem to switch my mind off.
Having access to a computer we can bring to bed (cell phone) doesn’t help with this either! I really try to leave it in the other room.
David Heinemeier Hansson did a great article on this topic a while back that I really enjoyed:
Sleep Deprivation Is Not A Badge Of Honor
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.