I used to participate in the Australian International Pedal Prix, where you race self-built recumberant bikes for 24 hours. I was a rider in 6 races over 3 years (team Sudden Impact), managed 2 teams in 2 years, and helped a few teams other years. The event is primarily for primary and secondary students (as a rider I was a secondary student), however there is an open category so (if time ever permits) I fully intend to build a new vehicle and race in it again as an adult team.
Teams consist of 6 riders, so 2 more than you're dealing with. By the end of the 24 hours we were absolutely rooted - BUT, here's where it gets interesting...
Each of the three years we raced twice - once in the Adelaide event and then, two months later, in the Victorian event (new at the time). After being absolutely rooted from the Adelaide race, a few days later we'd be back on our regular racing bikes and realising we had insane amounts of energy. This would last for about a month, and the month after that still have increased endurance and strength. Then the Victorian race would arrive and, wouldn't you know it, we'd not only do bloody great (infact winning the event outright all three years) but we'd still be full of energy after. In fact, since we had travelled from Adelaide and would stay and extra night after before heading back, we'd be hacking around in the bike/swimming/running around/etc for endless hours that night and STILL be full of energy.
I had always intended that one year we'd do a "simulated" 24 hour race before the Adelaide race - ie a month prior we'd go to a velodrome and take shifts at tearing around, perhaps two at a time to give some competition, to put ourselves under the same drain as doing the Adelaide race (though naturally you'll never be able to push yourself as hard, nor for the entire time). My theory was that a month later, as per the Victorian race, we'd arrive at the Adelaide race fully pumped up and ready to take the event out.
I never ended up trying that theory out, but I still believe in it to this day. If/when I organise a new team, build a new vehicle, and race in the event again I intend do carry this out - even if just a 12 hour one. Not only would it have the fitness benefits, but would give the brand new team a chance to get used to the vehicle as well as get the pit changes down pat (having this work efficiently became a great asset to us all those years back).
Anyways not sure if that's any help. Diets are dangerous in my opinion unless it's something you've been doing WELL and FAR in advance - we tried this one year, basically 2 or 3 weeks before the event, and little did we realise our diet had drained ourselves of crucial energy. Our first few hours each were fine, difficult but you assumed that was because of race condition, but after that we were all 100000% drained of energy for the rest of the 24 hour race... continuing on was pure hell. We were teenagers after all, guess we didn't necessarily know what we were doing, but my advise is to ensure you're not implementing any change too soon to the event - you'll have to live with the consequences throughout a 24 hour race!
What else? Sleep - my first year I found this easy, dosed straight off, which was important for recharging ready to wake up and take over the race. However, the other two years I found it very very difficult - I was still pumped up and sweating, so getting to sleep was virtually impossible... until 5 minutes before it was my shift in the bike again... :\
The issue of spares, equipment for repairs, etc is obviously completely and utterly obvious. Batteries - like tubes and tyres, you can't have enough of those. Don't forget spare lights allowing for accidents - 24 hours of racing can result in anything!
I guess the one big piece of advise I can give is that in the years I raced, the years I helped other teams, and the teams I managed we always did one thing exactly the same - we divided the team into two groups. We divided the 24 hour race up into timeslots, and each group was assigned an alternating slot. During those slots whichever group is "active" rotates between their 3 riders - the other 3 would help with pits or whatever, but otherwise they are off duty and free to sleep/rest/eat/whatever. This gives you added time to recharge compared to simply alternating directly between all the riders. It also means that during the night each group gets to have a sleep.
Not sure if any of this helps being a different type of racing and especially given you're talking only 4 riders, but hopefully it is at least a start towards some advise. Fire away any specific questions though, I'm sure there's countless of scenarios we encountered that I'm not thinking of.