To so many people coffee has always been their go-to hack for staying alert or focused whenever they need to stay up late. This hack is also used by non-coffee lovers as it is very effective. I belong to this class of people as my cup of coffee always comes through for me whenever I need to focus at night.
To another class of people, music does the work but to me, I get distracted by it instead of staying focused.