How to stay awake?

If coffee doesn't properly work on people with ADHD, than what are the alternatives that can be used in situations when you're groggy or haven't been sleeping a lot?

I usually just take coffee, because I did that for 20 years before getting diagnosed, but I'm not sure it does anything. maybe only in cases when I'm literally falling asleep.

Sometimes regular 8-9 hour sleeping doesn't prevent sleepiness during the day, so high quality sleep doesn't always help