Why poor sleep causes pain