noun
just before going to bed; just as one gets into bed
Often used with the particle に (寝しなに) to describe an action taken right before sleep.
寝しなにスマホを見ると、目が冴えてしまう。
If you look at your smartphone just before bed, you'll become wide awake.
寝しなに一杯の水を飲むのが習慣だ。
I have a habit of drinking a glass of water just before going to bed.