I'd like to give my opinion
first, we know in order to make a complete sentence we need at least a subject and a predicate. ex. I hope everthing is all right, but sometimes in speaking the subject is omitted with presumption that the listeners are already understand, ex. hope everthing is all right.
second, most of the verbs will be followed by to+v1. ex, try to do. However, there are also verbs that is followed by gerund. such as: quit trying, stop smoking etc
list of verbs followed by gerunds
so, in my opinion, the answer shoudl be
I'm staying up working on my thesis.
staying up working on my thesis.
"quiting smoking is not easy". it's gramatically NOT wrong. but you can also use "to quit smoking is not easy".
Hope it answers the questions