You know pretty quickly when you didn't sleep too well, and you'll know it for the rest of your day. That's why it's important to make sure you're getting both the time and quality you need.

Sleep seems to be the most important physical factor in productivity - Productivity, Sam Altman

Quality

On all days for the past few months, ten minutes to three hours have been eaten up by lying in bed or going straight back to sleep. I don't know why this happens.

The best schedule which works right now is going to sleep somewhere between 2am and 4am. This is likely to move to a more reasonable time as I age.

This works:

I take a low dose of sleeping pills (like a third of a normal dose) or a very low dose of cannabis whenever I can’t sleep. I am a bad sleeper in general, and a particularly bad sleeper when I travel. It likely has tradeoffs, but so does not sleeping well. - Productivity, Sam Altman