I'm trying to understand how ばかりになっていた modifies the preceding verb. I can think of two possibilities for the above sentence:
a) I was just about to go to sleep (involuntary)
b) I had just become/got ready to go to bed/sleep. (preparation)
Are either one of these correct (I'm favouring option a. since I think なる is more about things that happen on their own and する is for when you bring about an action)? If not, please explain meaning and use of ばかりになる. Can I use this expression more generally? Thanks.