One night Messenger of Allah ﷺ offered the prayer in the Mosque and the people followed him. The next night he also offered the prayer and too many people gathered. On the third and the fourth nights more people gathered, but Messenger of Allah ﷺ did not come out to them. In the morning he said, "I saw what you were doing and nothing but the fear that it (i.e. the prayer) might be enjoined on you, stopped me from coming to you." And that happened in the month of Ramadan.
عَنْ عَائِشَةَ أُمِّ الْمُؤْمِنِينَ ؓ أَنَّ رَسُولَ اللَّهِ ﷺ صَلَّى ذَاتَ لَيْلَةٍ فِي الْمَسْجِدِ فَصَلَّى بِصَلاَتِهِ نَاسٌ ثُمَّ صَلَّى مِنَ الْقَابِلَةِ فَكَثُرَ النَّاسُ ثُمَّ اجْتَمَعُوا مِنَ اللَّيْلَةِ الثَّالِثَةِ أَوِ الرَّابِعَةِ فَلَمْ يَخْرُجْ إِلَيْهِمْ رَسُولُ اللَّهِ ﷺ فَلَمَّا أَصْبَحَ قَالَ قَدْ رَأَيْتُ الَّذِي صَنَعْتُمْ وَلَمْ يَمْنَعْنِي مِنَ الْخُرُوجِ إِلَيْكُمْ إِلاَّ أَنِّي خَشِيتُ أَنْ تُفْرَضَ عَلَيْكُمْ وَذَلِكَ فِي رَمَضَانَ