Yes. To do this, select the number of travelers under 'Travelers' on nightride.com. So you only see connections where you can book for the selected number of travelers.
Some providers offer group discounts above a certain number of travelers (e.g. ÖBB above four travelers). nightride.com does not always show these discounts yet. You will see the group discounts - if available - at the latest when booking on the vendor's website.
Depending on the provider, you can also book a private compartment for you and your fellow travelers.
For groups, you should book early - especially if you want to travel in the same compartment.
Most vendors limit online bookings to 6 travelers, as does nightride.com. Six travelers correspond to an entire couchette compartment. If you want to book for more people, make several separate bookings. Alternatively, certain providers offer particular booking forms for larger groups (e.g. ÖBB/nightjet.com here) or you can call their hotline.