My late granduncle used to live by a simple philosophy:
"eat well, sleep well, shit well"
If you suffer from prolonged insomnia, there's a good chance it
will have an impact on your appetite or bowel movement.
I agree with Ronica about exercise. Also, avoid using your bed
for work activities, reserve it for bedtime.