I found in college that lack of sleep significantly reduced my anxious and depressive thoughts, but it also reduced my ability to think deeply about things, I think it was sort of a less thinking has both negative and positive side effects type of thing
As someone with (not diagnosed) depression and (diagnosed) insomnia I have never thought about it but I think this tracks with my experience sort of. I regularly go 24 hours or more without sleep and tend to feel only tiredness - not my other symptoms of depression.