Hi, it sounds like you drank so much you blacked out. You obviously locked your own door and do not remember, being blacked out. It happens from drinking way too much and your body shuts down. You are literally poisoning yourself, and you could cause yourself fatality. Its very dangerous to do, hopefully you can stop drinking to such a high degree or quit. Talk to your doctor about alcohol poisoning and he can confirm this. Doctor could also get your toxicity checked in your liver, hopefully your liver is still healthy. Please take this seriously before it's too late.
Do you drink like this often? Count your blessings you woke up. Many dont.
Ask your friends when they left. If you locked the door behind them, that is better than not locking the door.