Questions & Answers about Когда мне не спится ночью, я выхожу на балкон и дышу глубоко.
Мне не спится is an impersonal construction meaning “I can’t sleep / I’m unable to fall asleep,” often implying it’s not fully under your control (restless, insomnia, thoughts, etc.).
Я не сплю simply means “I’m not sleeping” (I’m awake), which can be deliberate or neutral.
Мне is dative. In impersonal “state” constructions (like мне холодно, мне не работается, мне не спится), Russian often uses the dative for the person experiencing the state—roughly “to me / for me.”
Here -ся forms an impersonal verb meaning “to sleep (successfully/easily),” often about how sleep “comes” to someone.
So (не) спится ≈ “(not) able to sleep / (not) sleepy / sleep doesn’t come.”
Russian often uses the present tense after когда to express a repeated or typical situation:
Когда мне не спится ночью, ... = “When(ever) I can’t sleep at night, ...” (a habitual pattern).