There is no need to buy ground coffee powder. No matter how simple it is, you need a filter paper. Coffee is brewed and can't be brewed, otherwise it will turn sour and stale.
If you often stay up like this, you'd better stop drinking coffee after 1 o'clock, or drink coffee for no reason, so as to ensure that you can fall asleep in time at 3 or 4 o'clock.
There are many ways to refresh yourself, such as moving, eating some fruit and drinking some water. Don't use refreshing products too strongly. The body needs a period of rest, or a student. Now it is more important to learn to arrange time and improve efficiency.