Due to suffering from fibromyalgia, I tend to have nights where I can shut off and sleep and then there are nights I just can't due to either pain or just not being able to shut off. It's a pain when I run into issues sleeping especially when I am very tired.
I always aim for around 6 - 8 hours of sleep at night but that can prove difficult sometimes and usually results in a nap or even just sleeping during the day to have some sleep.