In one version Shiva is living with the Goddess Kali in the Satya Yuga, the first and most perfect of the four periods of the world cycle.
Shiva grows restless and decides he is tired of living with Kali.