I coded the methodology based on the paper "Free Water Elimination and Mapping from Diffusion MRI" and I am curious if I am legally bound to take permission from the authors or the journal in making the code open source on Github?
You are not required to get permission to implement an idea you have read about in a paper, or to make it open source.
The paper is protected by copyright, but this only protects the text and images in the paper (the expression of the idea), not the idea itself. The copyright on the paper does not prevent you from creating your own realization of the idea in code and distributing it freely. You should also acknowledge the source of the idea by citing the paper in which you read about it, but this is an ethical requirement, not a legal one.
The exception to this is if the methodology in the paper is patented; in this case additional restrictions on what you can do will apply.
IANAL and thus I won't give legal advice. Whether you have to ask them or not is irrelevant. Asking them is a courtesy which the authors will most certainly appreciate and might even cause them to endorse your project, maybe even as the official implementation which they might also contribute to.
In the unlikely event that they strictly deny you permission (maybe they already have their own implementation that they want to distribute commercially and thus they wouldn't want a free competitor) then is the correct time to take legal advice. Assuming you're working in an academic institution they most likely have a legal department which you could and should check on. Of course you can also do so before contacting the authors, maybe asking about the proper approach to not make you accidentally liable.
Just don't trust the internet for legal advice.
Might be best to check whether the information in the paper is covered by more than just copyright. In the US, for example, even mere algorithms can be patented, so implementing the algorithm in code, even though the code itself is all your work and copyrighted to you, can still be a patent violation.
IMHO you must cite their paper in your Github repository explicitly, but you are not required to get a permission.