The past 4 days when I went to bed late and woke up 4 hours later feeling refreshed i'd stay awake. Later on in the day I'm very tired so I went to bed early. 5 hours of sleep, refreshed, but in dark.

Question?? Not really sure the question but what i can tell you is that most people, particularly below age 40 can get by with 4-6 hours of sleep fine short term and even feel refreshed. The time of day can be all over as well. This doesn't last. Day 3-5 catch up and sleep overwhelms. Hope this helps.
Sleep requirements. The body does best with 8-10 hours of sleep at night. Try to go to bed at the same hour every night, but have a quiet hour before bedtime. Relax by turning off all electronic devices, take a walk or tale a warm bath.