Your engine should be cool, and you should give the oil time to completely drain back into the sump by waiting at least 20 minutes.