From what I have read, they all wrote when they were sober, not when they were drunk.
https://www.forbes.com/sites/henrydevries/2018/12/11/ernest-...
https://www.forbes.com/sites/henrydevries/2018/12/11/ernest-...
9:00(pm) starts snorting cocaine seriously
10:00 drops acid
11:00 Chartreuse, cocaine, grass
11:30 cocaine, etc, etc.
12:00 midnight, Hunter S. Thompson is ready to write
12:05-6:00 a.m. Chartreuse, cocaine, grass, Chivas, coffee, Heineken, clove cigarettes, grapefruit, Dunhills, orange juice, gin, continuous pornographic movies.