The following is one of the model sentences I have found in a writing/composition textbook now in use for high school students in Japan. Just before going to sleep is the time when I enjoy reading the most. I am wondering if it is grammatically correct to take a prepositional phrase like “just before going to sleep” as the subject of a sentence. When I was a student, I was taught that the subject of a sentence should be a noun equivalent. Or is the sentence above an “inverted” sentence? Any comment would be appreciated.