Seven hours is reasonable and enough.
If you have to stay up late and face the computer, I hope you can eat more bananas. Bananas can help you relieve visual fatigue. It's best to reduce your dependence on coffee, drink green tea or scented tea instead, and eat more vegetarian fiber to help you adjust the load of internal organs.