Hydrogels are potential materials in many biomedical applications. A particularly promising application is their use in bone tissue engineering as implants or layers on the surface of titanium alloys. Disadvantage in the use of hydrogels in drug release system is often “burst release” effect what obstructs controlled release of pharmaceutically active agent. This functionality can be obtained by using an appropriate hydrogel, which has in its structure ions to which the drug is complexed. In this work, hydrogel materials containing mers with phosphate groups were prepared and used in the controlled drug release. The prepared material was functionalized with Ca2+, Mg2+, and Sr2+ ions. These ions were chosen because they support the osseointegration process. The possibility of sorption of the drug for osteoporosis (risedronate) was tested on the prepared hydrogels. Sorption was effective only on the hydrogel with calcium ions. The drug was evenly distributed throughout the hydrogel. The new hydrogel has proven to be able to retain the drug and slowly release it in small doses. We assume that the prepared material has the potential to be used as a coating for bone implants or as an implantable hydrogel for people suffering from osteoporosis.