Yes. The immune system can be affected if your pet is not having an adequade sleep. In a stressful situation like sleep deprivation the body can produce more cortisol that is one of the elements involved in controling the balance of the immune system.