I can't comment on depression, but I've been fighting (losing) a battle agaisnt insomnia for like a decade now. The thing is that it can't really be diagnosed. Insomnia is often a sign of underlying issues, so I would think about that first.
Are you an anxious person who overthinks while trying to fall asleep? Is your body used to sleeping late?......