No restrictions on changing terminals; bags can be checked through to final destination or claimed and re-checked the next day. If you have a UK visa or don't need one you can leave the airport and find a hotel. Though I've never done it in all my transiting, you can take the Heathrow express to Paddington and be downtown in 15 minutes which could be more fun (albeit more expensive) for eating and sightseeing. Over 24 hours triggers APD as well as higher fares since it's a stopover, and you have to claim your luggage.