Actually, the last human settlement before Everest Base Camp is Gorekhshep. There are no teahouses/guesthouses/hotels at Everest Base Camp. Therefore, you can not stay overnight at Everest Base Camp. However, if you carry all the required food items, tents and equipment for accommodation, you can stay overnight at Everest Base Camp. But, you need to have that permit prior to the trekking.