I will travel from Delhi to Canada. In way my flight there’s a layover in Mumbai for 22 hrs. Can I stay in a hotel outside of the airport?
Second thing: will I receive my checked in luggage in Mumbai or will it stay in the sorting system in the airport?
Since New Delhi and Mumbai are both in India, that portion of the flight will be domestic. Assume that most passengers of this domestic flight will also be leaving the airport.
You should ask the Airline to get a reliable answer about your luggage. The longer the layover, the less likly such a transfer of luggage will take place. It also depends on how the whole trip was booked. If you booked both flights separately, assume that you must pick up your bags in Mumbai.