Although you can arrange this trip by yourself, booking trains, tickets and accommodation, I would recommend to book the whole tour, including the Sacred Valley from a local tour operator. We used Mondo Mapi Adventure, and it was ok.
Before going to the actual place, no matter when, use some mosquito repellent. Any, but USE it before going up.
Make sure to take some water and snacks with you before taking the bus or the trail. There is a coffee shop at the entrance, but the prices are as high as Machu Picchu.
You can visit the site twice with the same ticket, first with a tour guide, if you have one or you pay one at the entrace. The second time, you are on your own, and you can stay the whole day.
Make sure to take pictures along the way, since you cannot go back, unless you go outside and reenter.
Enjoy the view, relax, and maybe your are lucky enough to take a picture with one of the Machu Picchu's lama.
P.s. Don't forget to stamp your passport with the Machu Picchu visa, just near the exit!
Own or manage this property? Claim your listing for free to respond to reviews, update your profile and much more.