I am aware that one can explain that to things happen at the same time using plain non past form + とき:
電車に乗るとき転びました。"I fell when I got on the train (I was going through the door when it happened)"
I am not quite sure about the following nuance, though : plain past form + とき means the first action was over when the second happened :
電車に乗ったとき転びました。 "I fell when I got on the train (I was already inside the train when it happened)"
Would it roughly mean the same thing as :
電車に乗った後転びました。"After I got on the train, I fell"
Eventually, would it be correct to express that I read a book before I went to sleep using :
本を読んだとき寝ました。