The order would be more logical if it was when you rise up comes before when you lie down. What do the mfarshim say about this?
One of the easiest interpretations to grasp, is that it follows the nature of Bereshis 1:5:
First night, lying down - then day, getting up.
וַיִּקְרָ֨א אֱלֹהִ֤ים ׀ לָאוֹר֙ י֔וֹם וְלַחֹ֖שֶׁךְ קָ֣רָא לָ֑יְלָה וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר י֥וֹם אֶחָֽד׃ (פ) God called the light Day, and the darkness He called Night. And there was evening and there was morning, a first day.
Also, this pasuk was written in this style to serve as a source (and hint?) to why we daven maariv first at night and then shacharis in the morning. It follows the order of the pasuk.
ובשכבך ובקומך. מאימתי קורין... וגם סידר של ערבית תחלה על סדר הכתוב בשכבך ובקומך
Going to sleep is mentioned before waking up because of causal priority.1
Because life begins in a state of awakeness, the concept of "waking up from sleep" does not exist without there first being a concept of "going to sleep". The reverse, however, is not true. The concept of "going to sleep" could exist without there being a concept of "waking up from sleep".
Because "going to sleep" is a fundamental prerequisite for "waking up from sleep" it is mentioned first.
(No, I do not have a source for this – למה לי קרא סברא היא)
1. It is not because of chronological priority (i.e. that night comes before day) because then we would have trouble making sense of a Talmudic passage. The Talmud (Berachot 2a) asks why the Mishnah discusses the Nighttime Shema before discussing the Daytime Shema. The Talmud first answers that the Mishnah was following the order of the verse where ובשכבך comes before ובקומיך. The Talmud then says that alternatively, the Mishnah was following the order of creation, where night occurred before day. If the reason for the order in the verse itself is that night comes before day, then there is no alternative answer. Both answers are saying the same thing, viz, that the Mishnah first discussed the Nighttime Shema because night comes before day.