While lack of sleep can weaken the immune system and make you more susceptible to infections, it's not a direct cause of styes. However, inadequate sleep can contribute to overall eye health issues, such as dry eyes or increased eye irritation, which may indirectly affect the likelihood of stye formation. Maintaining good sleep hygiene and getting sufficient rest can help support overall immune function and eye health.