A few thoughts: words like sleepless and wakefulness, both describe an inability to sleep by one who desires sleep, though neither describes or requires being in bed at the time.

However, one who desires to sleep but is unable whilst laying in bed is often said to be, tossing and turning.

toss and turn: to move about and turn over in bed because one is unable to sleep (Websters)