You may request that the account be permanently deleted.
You also have the option to memorialize the page. When an account is memorialized people may post messages to the page but the account is secured so that no one may sign into it.
For either option visit www.facebook.com/help then click the "Manage Your Account" link on the left. There will be an option to click "Memorialized Accounts". At that time Facebook may require proof of death and your relationship to the deceased.
Facebook has recently added a proactive step for such situations. The option is for the addition of a "Legacy Contact". According to Facebook a legacy contact is someone you choose to look after your account if it is ever memorialized. The legacy contact cannot log into your account and pose as you, but rather is simply a "digital executor" that will be able to do things such as respond to posts, write a pinned post for your profile, update your profile picture and cover photo, and respond to new friend requests.
To add a legacy contact Facebook has supplied the following instructions:
Click in the top right of Facebook and select Settings
In the left menu, click Security
Click Legacy Contact
Type in a friend's name and click Add
To let your friend know they're now your legacy contact, click Send
To change or remove a legacy contact, follow steps 1–3 above, then click Remove. From there, you can add a new legacy contact if you'd like.
Instagram's options are similar to Facebook insomuch that you may request the account be deleted or you may request it to be memorialized. To do either, visit help.instagram.com then choose "Privacy and Safety Center" and then "Report Something" and finally, "Other Types of Reports". This will bring you to a help page that will further explain your options and how to implement them.
LinkedIn has an electronic form on their site that you may notify them of your loved one's death and have their account removed. This form can be accessed here or by going to help.linkedin.com and typing in the search bar "deceased".