The Medici family were exceptionally powerful within Italy during Michelangelo's career, and they were also passionate about art and architecture as well. They wanted to be seen in and around the finest Italian art and would proactively seek out the major exponents of it for their own projects. So be gifted a commission for them was therefore a huge honour, but to actually design a tomb for them was a level up from that. By this stage in his career, though, Michelangelo was growing in confidence and was never anxious about this request, but rather saw the incredible opportunity with which to further stamp a mark on his career and also build his reputation and connections yet further. Most considered him to be the finest sculptor in history at this stage.
It was Pope Leo X (1513-23) who awarded the commission in 1520, and work would commence around four years later. At that point there were a number of notable tombs which could be brought together in an outstanding venue worthy of their statuses and that was the intention behind the commission. The Pope wanted his brother Giuliano, nephew Lorenzo and a number of other figures to be merged together in the same building. Some were currently held at the Old Sacristy of San Lorenzo. Michelangelo himself actually worked on the New Sacristy. At a time when war was common, as were political skullduggery, deaths of major figures was relatively common and so it was a matter to consider even when one is alive, as to how they were to be buried at a later date. Many would be involved with the plans for their own tombs and saw it as an opportunity to impact other's views of them, even after they had passed away.
It is likely that the sculptor very much enjoyed this project, because of the freedom that he was afforded by the Pope. Michelangelo was a strong character who respected only very few individuals and never took well to being advised on artistic matters, particularly from those who were not artists themselves. Perhaps the Pope understood this, and decided to allow this creative man to go in whatever direction he desired, so long as several key ambitions were met. This lack of interference may also have helped the project to be completed relatively efficiently, as other items that he worked on would involve multiple re-designs and changes due to political issues or other factors outside of his control. The original plans are still in existence and these have helped art historians to piece together the project from inception to completion. As with many other Michelangelo plans, the initial ideas were much more ambitious than would be the realised creation - logistical and political issues would regularly force him to reduce the scope of his work.