It might be helpful to have sleep tracking to have a better idea of what you need.
There's hardware like https://dreem.com/en/product that promises to help people sleep better.
General tips for better sleep are about avoiding blue light right before bed. I sat my f.lux so red that green and black became the same color. In addition I have Philips Hue lights that dim red.
Cool down the room when you are sleeping.
Make the room in which you are sleeping pitch black.
Don't eat anything 2 hours before going to bed.
An off-label use of fluoxetine (Prozac) is that it can caused prolonged sleep, possibly by reducing anxiety in ways that make it easier to stay asleep longer but specific mechanism of action is unknown. Worked well for me in treating narcolepsy-related sleep depravation, i.e allowed me to stay asleep 10 hours a night so I got enough sleep to avoid sleep attacks during the day. I'm no longer on it and still able to get enough sleep; my theory there is that regular meditation replaced the need for a drug to produce the same effect, allowing me to stay asleep longer.
Methods I've personally found useful for improving productivity when temporarily my cognitive ability or conscientiousness is lowered, not necessarily due to sleep deprivation:
You seem to assume that your lowered ability is caused by sleep deprivation. Is that an assumption? If so, I would encourage you to track your sleep quality and your cognitive performance and see if they really correlate, if you can think of a way to do it.
My fully subjective impression is that my insomnia never impacted my cognitive performance. I used to stress about it impacting my bodybuilding. Then I started believing that the impact of my sleep deprivation is minimal, if any, and that new belief probably helped me improve quality of my sleep.
I've recently been finding that I struggle much more with intellectual work (math, hard programming, writing, etc.) when I sleep less 6.5-7 hours. While I'm at peace with the fact that I seem to generally require >7 hours a sleep, it's frustrating that even though I set aside enough time for adequate sleep, I'll often wake up after only ~6 hours of sleep and not be able to fall back asleep.
My cognitive ability seems to be impacted by a single night of bad sleep even when I've been sleeping well in the recent past. Concretely, if I've slept 8 hours every night for two weeks, a single night of poor sleep can still result in a ~50% less productive day.
In addition to impacting productivity, acute sleep deprivation also leaves me much less capable of entertaining myself by thinking, so I become much more inclined to seek out distracting forms of entertainment like scrolling through the internet. It also seems to increase my cravings for generally "unhealthy" foods (I've seen references to this in literature, but won't bother linking them since it's not the focus of my question).
Other useful notes about my general sleep habits/history include:
I'd love to hear others' strategies for mitigating the impact of acute sleep deprivation on cognitive ability. I've done some preliminary searching for papers, articles, etc., but those that I've found focus on reducing tiredness rather than on returning cognitive ability to baseline. I'm open to trying strategies including but not limited to diet changes, supplements, medication, and habit changes.