Sleepless nights don’t just leave you feeling tired and irritable — they also affect how well your brain works, especially when it comes…